File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -563,7 +563,8 @@ resource "docker_container" "workspace" {
563563 # Stash the host socket outside /run, which systemd remounts as a fresh
564564 # tmpfs at boot and would shadow a bind mount placed there. A systemd
565565 # .mount unit in the image re-binds /host-docker.sock onto
566- # /var/run/docker.sock after /run is set up.
566+ # /run/docker.sock after /run is set up. (/var/run is a symlink to /run on
567+ # Debian; systemd rejects non-canonical mount unit paths.)
567568 volumes {
568569 container_path = " /host-docker.sock"
569570 host_path = " /var/run/docker.sock"
Original file line number Diff line number Diff line change @@ -128,12 +128,12 @@ RUN printf '\nif [ -d /etc/profile.d ]; then\n for i in /etc/profile.d/*.sh; do
128128RUN mkdir -p /etc/coder
129129COPY src/base/coder-agent.service /etc/systemd/system/coder-agent.service
130130COPY src/base/web-shell.service /etc/systemd/system/web-shell.service
131- COPY src/base/var- run-docker.sock.mount /etc/systemd/system/var- run-docker.sock.mount
131+ COPY src/base/run-docker.sock.mount /etc/systemd/system/run-docker.sock.mount
132132COPY src/base/docker-sock.tmpfiles.conf /etc/tmpfiles.d/docker-sock.conf
133133COPY --chmod=0755 src/base/web-shell-launch.sh /usr/local/bin/web-shell-launch
134134RUN install -m 0644 /dev/null /var/log/web-shell.log && \
135135 chown coder:coder /var/log/web-shell.log && \
136- systemctl enable coder-agent.service web-shell.service var- run-docker.sock.mount
136+ systemctl enable coder-agent.service web-shell.service run-docker.sock.mount
137137
138138# Entrypoint claims fresh-volume mountpoints for the workspace user before
139139# systemd starts. See entrypoint.sh for rationale.
Original file line number Diff line number Diff line change 11[Unit]
22Description =Coder Agent
3- After =network-online.target var- run-docker.sock.mount
3+ After =network-online.target run-docker.sock.mount
44Wants =network-online.target
5- Requires =var- run-docker.sock.mount
5+ Requires =run-docker.sock.mount
66ConditionPathExists =/etc/coder/agent-init.sh
77
88[Service]
Original file line number Diff line number Diff line change 1- f /var/ run/docker.sock 0660 root docker -
1+ f /run/docker.sock 0660 root docker -
Original file line number Diff line number Diff line change 11[Unit]
2- Description =Bind-mount host Docker socket into /var/ run
2+ Description =Bind-mount host Docker socket into /run
33DefaultDependencies =no
44After =systemd-tmpfiles-setup.service
55Requires =systemd-tmpfiles-setup.service
@@ -9,7 +9,7 @@ Conflicts=shutdown.target
99
1010[Mount]
1111What =/host-docker.sock
12- Where =/var/ run/docker.sock
12+ Where =/run/docker.sock
1313Type =none
1414Options =bind
1515
Original file line number Diff line number Diff line change 11[Unit]
22Description =web-shell
3- After =network-online.target var- run-docker.sock.mount
3+ After =network-online.target run-docker.sock.mount
44Wants =network-online.target
5- Requires =var- run-docker.sock.mount
5+ Requires =run-docker.sock.mount
66
77[Service]
88Type =simple
You can’t perform that action at this time.
0 commit comments