Comments (3)
and should update the docker version and other dependencies' version
also use go mod to replace the glide
from container-web-tty.
Maybe I'll leave this issue OPEN as #31 (comment):
Since docker will not re-bind the files to the containers after it restarts, so if we mount the
docker.sock
to the container, we will lose the connection to the restarted docker daemon since the docker daemon recreated its socket file, thedocker.sock
inside the container is actually a deleted file(we cannot see it in the outside, but we can get it inside the container).The obvious solution is to restart the container so that the docker will re-bind the socket file.
Another way to solve this is to mount the whole
/var/run
directory to the container since the directory won't be deleted, thecontainer-web-tty
can still connect to the new docker daemon.docker run --rm -ti --name web-tty \ -p 8080:8080 \ -v /var/run/:/var/run/ \ wrfly/container-web-ttyMaybe it's a bug of docker, and it's quite easy to reproduce. Just mount a file to a container and delete that file, and you can still get the contant inside the container. At mainwhile, any changes before delete the file can be seen inside the container since the file is the same, it has the same inode number. But after delete the file in the host, we lost control of this file, and the file can be and only be found in the container. We can use
lsof -L1 | grep deleted
to get all the deleted files (in the host but not the container) and when wetail -f
the "deleted" file inside the container, we can see the process is reading a "deleted" file. And we can also get the contant from its file descriptor(just cat it).
from container-web-tty.
Also check this: moby/moby#38955
from container-web-tty.
Related Issues (20)
- feat: update container list triggered by events
- Connection close HOT 5
- Disable terminals HOT 8
- "mesg: ttyname failed: No such device"
- behind proxy configuration HOT 5
- Support podman HOT 2
- Something wrong with using iframes HOT 5
- Question about CMD HOT 3
- how to enable Access list to web-tty HOT 3
- how to build Docker image after making changes into the source code HOT 3
- grpc backend not automatically syncing the newly added container in all grpc servers HOT 2
- k3s下可读取到容器列表,但连接TTY会失败 HOT 5
- k3s下查看容器日志,换行格式混乱 HOT 9
- URL Base HOT 6
- container-web-tty 终端异常中断 HOT 1
- Dockerfile no longer building HOT 1
- Upgrade dependency "github.com/gin-gonic/gin" HOT 1
- docker cli watch events error HOT 3
- Lost connection to docker socket HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container-web-tty.