File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ RUN ARCH="$(dpkg --print-architecture)" && \
42
42
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh
43
43
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages dpkg -i /tmp/packages/code-server*$(dpkg --print-architecture).deb
44
44
45
+ # Allow users to have scripts run on container startup to prepare workspace.
46
+ # https://github.com/coder/code-server/issues/5177
47
+ ENV ENTRYPOINTD=${HOME}/entrypoint.d
48
+ RUN mkdir -p ${ENTRYPOINTD}
49
+
45
50
EXPOSE 8080
46
51
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
47
52
# the uid will remain the same. note: only relevant if -u isn't passed to
Original file line number Diff line number Diff line change @@ -18,4 +18,13 @@ if [ "${DOCKER_USER-}" ]; then
18
18
fi
19
19
fi
20
20
21
+ # Allow users to have scripts run on container startup to prepare workspace.
22
+ # https://github.com/coder/code-server/issues/5177
23
+ chmod u+x ${ENTRYPOINTD} /* .sh
24
+ sudo chown -R ${USER} ${ENTRYPOINTD} /*
25
+ for f in ${ENTRYPOINTD} /* .sh; do
26
+ echo " Running Entrypoint: ${f} "
27
+ bash " ${f} "
28
+ done
29
+
21
30
exec dumb-init /usr/bin/code-server " $@ "
You can’t perform that action at this time.
0 commit comments