mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
getty,sshd: Mount host /tmp into containers.
ctr (which runs in the getty or ssh container) relies on sharing files in /tmp with containerd (which runs in the host mount namespace). Specifically it currently uses paths under /tmp/containerd for the stdio FIFOs of containers, resulting in: # ctr run -t docker.io/library/redis:alpine test ctr: rpc error: code = Unknown desc = runtime create failed: runc create failed: container with id exists: test Currently it is not possible to specify a non-existent source directory for a bind mount, so we cannot easily bind just /tmp/containerd. Sharing all of /tmp doesn't sound like a terrible idea anyway. Defering updating the sha in *.yml until after some further changes to these packages. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
ea79748830
commit
34fbe42615
@ -28,4 +28,4 @@ COPY --from=mirror /out/ /
|
||||
COPY usr/ /usr/
|
||||
COPY etc/ /etc/
|
||||
CMD ["/usr/bin/rungetty.sh"]
|
||||
LABEL org.mobyproject.config='{"pid": "host", "net":"host", "binds": ["/run:/run", "/etc:/hostroot/etc", "/usr/bin/ctr:/usr/bin/ctr", "/usr/bin/runc:/usr/bin/runc", "/usr/bin/dist:/usr/bin/dist", "/var:/var","/containers:/containers","/dev:/dev","/sys:/sys"], "capabilities": ["all"]}'
|
||||
LABEL org.mobyproject.config='{"pid": "host", "net":"host", "binds": ["/run:/run", "/tmp:/tmp", "/etc:/hostroot/etc", "/usr/bin/ctr:/usr/bin/ctr", "/usr/bin/runc:/usr/bin/runc", "/usr/bin/dist:/usr/bin/dist", "/var:/var","/containers:/containers","/dev:/dev","/sys:/sys"], "capabilities": ["all"]}'
|
||||
|
@ -19,4 +19,4 @@ COPY etc/ /etc/
|
||||
COPY usr/ /usr/
|
||||
RUN mkdir -p /etc/ssh /root/.ssh && chmod 0700 /root/.ssh
|
||||
CMD ["/sbin/tini", "/usr/bin/ssh.sh"]
|
||||
LABEL org.mobyproject.config='{"pid": "host", "binds": ["/root/.ssh:/root/.ssh", "/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["all"]}'
|
||||
LABEL org.mobyproject.config='{"pid": "host", "binds": ["/tmp:/tmp", "/root/.ssh:/root/.ssh", "/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["all"]}'
|
||||
|
Loading…
Reference in New Issue
Block a user