diff options
Diffstat (limited to 'services/docker/debian-dev/Dockerfile')
-rw-r--r-- | services/docker/debian-dev/Dockerfile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/services/docker/debian-dev/Dockerfile b/services/docker/debian-dev/Dockerfile new file mode 100644 index 0000000..8114c56 --- /dev/null +++ b/services/docker/debian-dev/Dockerfile @@ -0,0 +1,24 @@ +FROM debian:latest + +ARG USER=crupest +ARG IN_CHINA= + +ENV CRUPEST_DEBIAN_DEV_USER=${USER} +ENV CRUPEST_DEBIAN_DEV_IN_CHINA=${IN_CHINA} + +ADD bootstrap /bootstrap +RUN /bootstrap/setup.bash + +ENV LANG=en_US.utf8 +USER ${USER} +WORKDIR /home/${USER} + +RUN --mount=type=secret,id=code-server-password,required=true,env=CRUPEST_CODE_SERVER_PASSWORD \ + mkdir -p ${HOME}/.config/code-server && \ + echo -e "auth: password\nhashed-password: " >> ${HOME}/.config/code-server/config.yaml && \ + echo -n "$CRUPEST_CODE_SERVER_PASSWORD" | argon2 $(shuf -i 10000000-99999999 -n 1 --random-source /dev/urandom) -e >> ${HOME}/.config/code-server/config.yaml + +EXPOSE 4567 +VOLUME [ "/home/${USER}" ] + +CMD [ "tini", "--", "/usr/bin/code-server", "--bind-addr", "0.0.0.0:4567" ] |