diff --git a/ci/release-image/Dockerfile b/ci/release-image/Dockerfile index cd82972a..f665a158 100644 --- a/ci/release-image/Dockerfile +++ b/ci/release-image/Dockerfile @@ -1,3 +1,8 @@ +# syntax=docker/dockerfile:experimental + +FROM scratch AS packages +COPY release-packages/code-server*.deb /tmp/ + FROM debian:11 RUN apt-get update \ @@ -34,9 +39,8 @@ RUN ARCH="$(dpkg --print-architecture)" && \ mkdir -p /etc/fixuid && \ printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml -COPY release-packages/code-server*.deb /tmp/ COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh -RUN dpkg -i /tmp/code-server*$(dpkg --print-architecture).deb && rm /tmp/code-server*.deb +RUN --mount=from=packages,src=/tmp,dst=/tmp/packages dpkg -i /tmp/packages/code-server*$(dpkg --print-architecture).deb EXPOSE 8080 # This way, if someone sets $DOCKER_USER, docker-exec will still work as