Merge pull request #1749 from lvjp/simple-docker-build

Make image build process a bit simpler
This commit is contained in:
Vidar Holen 2019-11-13 22:04:14 -08:00 committed by GitHub
commit daa9c08dd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -23,8 +23,7 @@ build_linux() {
# Linux Alpine based Docker image
name="$DOCKER_BASE-alpine"
DOCKER_BUILDS="$DOCKER_BUILDS $name"
sed -e '/DELETE-MARKER/,$d' Dockerfile > Dockerfile.alpine
docker build -f Dockerfile.alpine -t "$name:current" .
docker build -f Dockerfile -t "$name:current" --target alpine .
docker run "$name:current" sh -c 'shellcheck --version'
}

View File

@ -22,7 +22,7 @@ RUN mkdir -p /out/bin && \
cp shellcheck /out/bin/
# Resulting Alpine image
FROM alpine:latest
FROM alpine:latest AS alpine
LABEL maintainer="Vidar Holen <vidar@vidarholen.net>"
COPY --from=build /out /