aboutsummaryrefslogtreecommitdiff
path: root/docker/code-server/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docker/code-server/Dockerfile')
-rw-r--r--docker/code-server/Dockerfile25
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/code-server/Dockerfile b/docker/code-server/Dockerfile
new file mode 100644
index 0000000..180cb7e
--- /dev/null
+++ b/docker/code-server/Dockerfile
@@ -0,0 +1,25 @@
+FROM archlinux:latest
+
+ARG CRUPEST_USER
+ARG CRUPEST_GROUP
+ARG CRUPEST_UID=1000
+ARG CRUPEST_GID=1000
+ARG CRUPEST_PACKAGES=""
+ARG CRUPEST_AUR_PACKAGES=""
+ARG USE_CHINA_MIRROR="false"
+ARG CHINA_MIRROR_URL="https://mirrors.tuna.tsinghua.edu.cn/archlinux/\$repo/os/\$arch"
+
+ADD ./archlinux-setup.bash ./archlinux-setup-user.bash ./restore-pacman-conf.py /tmp/
+
+ENV CRUPEST_IN_DOCKER="true"
+WORKDIR /tmp
+RUN /tmp/archlinux-setup.bash
+USER ${CRUPEST_UID}:${CRUPEST_GID}
+WORKDIR /home/${CRUPEST_USER}
+RUN /tmp/archlinux-setup-user.bash
+
+VOLUME [ "/data" ]
+EXPOSE 8080
+
+ENV CODE_SERVER_CONFIG="/data/code-server-config.yaml"
+ENTRYPOINT [ "code-sever", "--bind-addr", "0.0.0.0:8080" ]