Exclude .deb files from release Docker image (#5068)

This commit is contained in:
David Wahler 2022-04-06 17:45:06 -05:00 committed by GitHub
parent 5bc26e90cb
commit 38e57a355b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# syntax=docker/dockerfile:experimental
FROM scratch AS packages
COPY release-packages/code-server*.deb /tmp/
FROM debian:11 FROM debian:11
RUN apt-get update \ RUN apt-get update \
@ -34,9 +39,8 @@ RUN ARCH="$(dpkg --print-architecture)" && \
mkdir -p /etc/fixuid && \ mkdir -p /etc/fixuid && \
printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml 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 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 EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as # This way, if someone sets $DOCKER_USER, docker-exec will still work as