Add libz for glibc-{busybox,distroless}

Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
This commit is contained in:
Fahmi Akbar Wildana 2019-09-09 16:45:55 +07:00
parent 7c541000a1
commit 0ca7aaa56f
No known key found for this signature in database
GPG Key ID: 86D1FDF35E9D3807
5 changed files with 20 additions and 3 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
*
!target/debug/nu*
!target/release/nu*
!dist/*
!LICENSE
!*.md

View File

@ -47,10 +47,10 @@ jobs:
- { tag: alpine, base-image: alpine, arch: x86_64-unknown-linux-musl, plugin: true }
- { tag: slim, base-image: 'debian:stable-slim', arch: x86_64-unknown-linux-gnu, plugin: true }
- { tag: debian, base-image: debian, arch: x86_64-unknown-linux-gnu, plugin: true }
- { tag: glibc-busybox, base-image: 'busybox:glibc', arch: x86_64-unknown-linux-gnu, plugin: false }
- { tag: glibc-busybox, base-image: 'busybox:glibc', arch: x86_64-unknown-linux-gnu, plugin: false, use-patch: true }
- { tag: musl-busybox, base-image: 'busybox:musl', arch: x86_64-unknown-linux-musl, plugin: false }
- { tag: musl-distroless, base-image: 'gcr.io/distroless/static', arch: x86_64-unknown-linux-musl, plugin: false }
- { tag: glibc-distroless, base-image: 'gcr.io/distroless/base', arch: x86_64-unknown-linux-gnu, plugin: false }
- { tag: glibc-distroless, base-image: 'gcr.io/distroless/base', arch: x86_64-unknown-linux-gnu, plugin: false, use-patch: true }
- { tag: glibc, base-image: scratch, arch: x86_64-unknown-linux-gnu, plugin: false }
- { tag: musl, base-image: scratch, arch: x86_64-unknown-linux-musl, plugin: false }
steps:
@ -61,6 +61,7 @@ jobs:
run: |
REGISTRY=${REGISTRY,,}; export TAG=${GITHUB_REF##*/}-${{ matrix.tag }};
export NU_BINS=target/release/$( [ ${{ matrix.plugin }} = true ] && echo nu* || echo nu )
export PATCH=$([ ${{ matrix.use-patch }} = true ] && echo .patch || echo '')
chmod +x $NU_BINS
echo ${{ secrets.DOCKER_REGISTRY }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

View File

@ -3,4 +3,5 @@ FROM ${base}
ARG artifact
COPY ${artifact} /bin/
ENTRYPOINT ["/bin/nu"]

View File

@ -0,0 +1,9 @@
ARG base
FROM debian:stable-slim AS patch
FROM ${base}
ARG artifact
COPY ${artifact} /bin/
COPY --from=patch /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
ENTRYPOINT ["/bin/nu"]

View File

@ -5,7 +5,7 @@ services:
image: ${REGISTRY}/nu:${TAG}
build:
context: ..
dockerfile: docker/Package.Dockerfile
dockerfile: docker/Package${PATCH}.Dockerfile
args:
base: ${BASE_IMAGE}
artifact: ${NU_BINS}