I jumped into Docker feet first a few months ago and have not had a real good time with it. Networking doesn’t make sense, I can’t ever seem to access config files without dropping to su -, all the tutorials and videos I find are pretty top level and assume the user already has a firm grasp on it. It’s great for drop in stuff like open speed test and Vaultwarden but I recently tried setting up dashy and I can’t even find the config files to edit. The Dashy documentation says the easiest way to edit the configs is to use code-server, so I spun up a code-server VM and can’t even get it to open the files because the web based VSC doesn’t allow for SSH editing. There’s nothing explained in the documentation beyond that.

Yes I’m frustrated but I’m not bitching as if these solutions are trash, I’m simply asking where can I go to learn this shit from the ground up? It doesn’t make any sense to me from the perspective that I’ve approached it. Networking seems to be silly and weird, entering an interactive TTY to the container seems to be useless as there’s no package manager and doesn’t seem to have vim, nano, or any native way to edit configs. It’s been extremely frustrating so I ask you, where can I learn what I’m doing wrong and how to properly work with Docker?

  • NekuSoul
    link
    fedilink
    71 year ago

    It doesn’t make any sense to me from the perspective that I’ve approached it.

    I think you’ve already identified the issue. Docker is pretty “simple”, but you’ve got to approach it from the right angle or else it doesn’t make sense. Apart from suggesting the official documentation I can’t give you much advice on how to learn it because my path to understanding Docker was pretty much just trying things out and iterating on it. That said here’s a tips that could help:

    • If you aren’t using Docker Compose already, you really should. Just having your entire configuration for a service in a single file really helps.
    • Aside from debugging, you normally aren’t meant to run commands manually in a container. It’s best to act like every container is just a black box that simply does its thing.
    • If you need to edit config files, the easiest way is to just directly on the host if you’re using bind mount volumes, or spin up a temporary container running Debian or Alpine for example that also has the Docker Volume mounted.

    As @[email protected] has already mentioned, building your own images is also pretty helpful since it strips a lot of the “black magic” away and teaches you how to further “mod” existing images.