File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,16 @@ LABEL \
15
15
org.opencontainers.image.version="$CODER_VERSION" \
16
16
org.opencontainers.image.licenses="AGPL-3.0"
17
17
18
+ # The coder binary is injected by scripts/build_docker.sh.
19
+ COPY --chown=coder:coder --chmod=755 coder /opt/coder
20
+
18
21
# Create coder group and user. We cannot use `addgroup` and `adduser` because
19
22
# they won't work if we're building the image for a different architecture.
20
23
COPY --chown=root:root --chmod=644 group passwd /etc/
21
-
22
- # The coder binary is injected by scripts/build_docker.sh.
23
- COPY --chown=coder:coder --chmod=755 coder /opt/coder
24
+ COPY --chown=coder:coder --chmod=700 empty-dir /home/coder
24
25
25
26
USER coder:coder
27
+ ENV HOME=/home/coder
28
+ WORKDIR /home/coder
29
+
26
30
ENTRYPOINT [ "/opt/coder" , "server" ]
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ docker rm "$temp_container_id" 1>&2
110
110
111
111
echo " coder:x:1000:coder" >> ./group
112
112
echo " coder:x:1000:1000::/:/bin/sh" >> ./passwd
113
+ mkdir ./empty-dir
113
114
114
115
docker buildx build \
115
116
--platform " $arch " \
You can’t perform that action at this time.
0 commit comments