Comment by gobip

Comment by gobip a day ago

6 replies

What if I need cron in my docker container? And ssh? And a text editor? And a monitoring agent? :P

Thankfully LXD is here to serve this need: very lightweight containers for systems, where your app runs in a complete ecosystem, but very light on the ram usage.

curt15 a day ago

>What if I need cron in my docker container? And ssh? And a text editor? And a monitoring agent? :P

How are you going to orchestrate all those daemons without systemd? :P

As you mentioned, a container running systemd and a suite of background services is the typical use case of LXD, not docker. But the difference seems to be cultural -- there's nothing preventing one from using systemd as the entry point of a docker container.

  • sally_glance a day ago

    fwiw I recently bootstrapped a small Debian image for myself, originally intended to sandbox coding agents I was evaluating. Shortly after I got annoyed by baseline vim and added my tmux & nvim dotfiles, now I find myself working inside the container regularly. It definitely works and is actually not the worst experience if your workflow is cli-focused.

    • BobbyTables2 9 hours ago

      Even putting GUI apps in a container isnt too bad once one develops the right incantation for x11/wayland forwarding.

    • SOLAR_FIELDS a day ago

      My experience is if the tooling is set up right it’s not painful, it’s the fiddling around with volume mounts folder permissions and debug points and “what’s inside the container and what isn’t” etc that is always the big pain point

      • sally_glance 20 hours ago

        Very accurate - that was one of the steps that caused me to fiddle quite a bit. Had to add an entrypoint to chown the mounts and also some Buildkit cache volumes for all the package managers.

        You can skip the uid/chown stuff if you work with userns mappings, but this was my work machine so I didn't want to globally touch the docker daemon.

ndsipa_pomu a day ago

Ideally, you have a separate docker container for each process (i.e. a separate container for the ssh service, one for cron etc). The text editor can be installed if it's needed - that's not an issue apart from slightly increasing the container size. Most of the time, the monitoring agent would be running on the host machine and setup to monitor aspects of the container - containers should be thought of as running a single process and not as running a VM along with all its services.