diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1e6f1881d8..e84cefd3ab 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -44,15 +44,15 @@ jobs: - glibc - musl include: - - { 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, 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, 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 } + - { 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, use-patch: true } + - { tag: musl-busybox, base-image: 'busybox:musl', arch: x86_64-unknown-linux-musl, } + - { tag: musl-distroless, base-image: 'gcr.io/distroless/static', arch: x86_64-unknown-linux-musl, } + - { tag: glibc-distroless, base-image: 'gcr.io/distroless/cc', arch: x86_64-unknown-linux-gnu, use-patch: true } + - { tag: glibc, base-image: scratch, arch: x86_64-unknown-linux-gnu, } + - { tag: musl, base-image: scratch, arch: x86_64-unknown-linux-musl, } steps: - uses: actions/checkout@v1 - uses: actions/download-artifact@master @@ -61,7 +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 '') + export PATCH=$([ ${{ matrix.use-patch }} = true ] && echo .${{ matrix.tag }} || echo '') chmod +x $NU_BINS echo ${{ secrets.DOCKER_REGISTRY }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin diff --git a/docker/Package.glibc-busybox.Dockerfile b/docker/Package.glibc-busybox.Dockerfile new file mode 100644 index 0000000000..76ddd9fd75 --- /dev/null +++ b/docker/Package.glibc-busybox.Dockerfile @@ -0,0 +1,10 @@ +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 +COPY --from=patch /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so.2 +ENTRYPOINT ["/bin/nu"] \ No newline at end of file diff --git a/docker/Package.patch.Dockerfile b/docker/Package.glibc-distroless.Dockerfile similarity index 100% rename from docker/Package.patch.Dockerfile rename to docker/Package.glibc-distroless.Dockerfile diff --git a/docs/docker.md b/docs/docker.md index 17ed135e92..b51f4e0cd0 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -8,7 +8,7 @@ | `musl-busybox` | `busybox:musl` | no | — | GNU utils + _musl_ | ~(1+16) MB | | `glibc-busybox` | `busybox:glibc` | no | — | GNU utils + _glibc_ | ~(3+17) MB | | `musl-distroless` | `distroless/static` | no | — | see [here][distroless/base] | ~(2+16) MB | -| `glibc-distroless` | `distroless/base` | no | — | `distroless/static` with _glibc_ | ~(17+17) MB | +| `glibc-distroless` | `distroless/cc` | no | — | `distroless/static` with _glibc_ | ~(17+17) MB | | `glibc` | `scratch` | no | — | **only `nu` binary-executable** which depend on glibc runtime | ~17 MB | | `musl` | `scratch` | no | — | **only `nu` binary-executable** statically linked to musl | ~16 MB |