mirror of https://github.com/captn3m0/muse-dl.git
Adds ubuntu based Dockerfile
This commit is contained in:
parent
ce0a901b47
commit
b354440d60
|
@ -1,8 +1,17 @@
|
||||||
language: crystal
|
language: crystal
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Path to 'hadolint' binary
|
||||||
|
HADOLINT: "${HOME}/hadolint"
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Download hadolint binary and set it as executable
|
||||||
|
- curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-$(uname -s)-$(uname -m)"
|
||||||
|
&& chmod 700 ${HADOLINT}
|
||||||
script:
|
script:
|
||||||
- crystal spec
|
- crystal spec
|
||||||
- crystal tool format --check
|
- crystal tool format --check
|
||||||
|
- git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 ${HADOLINT}
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
|
21
Dockerfile
21
Dockerfile
|
@ -1,13 +1,24 @@
|
||||||
FROM jrei/crystal-alpine as builder
|
FROM ubuntu:19.04
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN shards install && shards build --release --static
|
# Add the key for the crystal debian repo
|
||||||
|
ADD https://keybase.io/crystal/pgp_keys.asc /tmp/crystal.gpg
|
||||||
|
|
||||||
FROM scratch
|
# Install gnupg for the apt-key operation and openssl for our TLS stuff
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install --yes --no-install-recommends gnupg=2.2.12-1ubuntu3 libssl-dev=1.1.1b-1ubuntu2.4 && \
|
||||||
|
# See https://crystal-lang.org/install/
|
||||||
|
apt-key add /tmp/crystal.gpg && \
|
||||||
|
echo "deb https://dist.crystal-lang.org/apt crystal main" > /etc/apt/sources.list.d/crystal.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install --no-install-recommends --yes crystal=0.33.0-1 pdftk=2.02-5 && \
|
||||||
|
# Cleanup
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /build/bin/muse-dl /
|
RUN shards install && shards build --release
|
||||||
|
|
||||||
ENTRYPOINT ["/muse-dl"]
|
ENTRYPOINT ["/build/bin/muse-dl"]
|
Loading…
Reference in New Issue