Hacker News new | ask | show | jobs
by kmoser 351 days ago
> Well, if you’re expecting Docker to have a file-system easily accessible, you’re wrong—in fact, that’s “the point.” I can’t use typical commands like updatedb/locate/find to find what I need. I have to run a command with a massive prefix specific to that container. I don’t have tab completion when running Docker container commands, so when I inevitably mistype while searching for the file or attempting to delete it, I have to re-edit a multi-line command.

Am I missing something? Isn't this as easy as:

docker exec -it --user <username> <container> /bin/bash

I used this just yesterday to get shell access to a Docker container. From there I have full access to the filesystem.

2 comments

Yes if they want to edit the running container config, that is exactly what to do. Also, if you are just running a mounted volume for the configs, you don't even have to go that far. You can just edit the mounted volume on the host machine and it will show up immediately in the container.

However, I would think you would want to edit the Dockerfile instead so that you fix it every time you restart the container.

But I think the whole point of this post is that the author has no idea how docker works and is mad about having to learn docker things, so nobody should use them. Never mind the entirety of cloud infrastructure running in containers and doing amazing things. Never mind being able to duplicate state across tons of different servers at the same time. It shows that the author isn't into making infrastructure at scale, and has no idea how incredible docker has been to software development, CI/CD pipelines, and deployment / release infrastructure as a whole.

No you're not missing anything, aside from the small part of containers that are "FROM scratch" and don't have a shell binary, you can do the command you wrote.

The author didn't seem to research how to use Docker before writing this.

OrbStack gets around the issue you mentioned

https://docs.orbstack.dev/features/debug