greyltc/docker-archlinux

Tips on how to use dockerized Arch

Closed this issue · 2 comments

I'm a bit lost on where to start. On Ubuntu, I could start sshd with service ssh start. However, on Arch systemctl complains of missing dbus. Any tips on how to launch services and do more?

Yeah, I've built this container without systemd (I don't think it's needed in containers). What I typically do if I need a thing that systemd generally starts is I inspect the systemd config file for that thing, then I do it manually.

Here's probably a very relevant example for you that's just my archlinux container with sshd :

https://github.com/greyltc/docker-sshd
https://hub.docker.com/r/greyltc/sshd/

Thanks, looking at systemd config files is the way to go.
Another trick that I couldn't find anywhere is to use dbus-launch. For example, to set up NoMachine to launch Xfce, set DefaultDesktopCommand "/usr/bin/dbus-launch /usr/bin/startxfce4" in /usr/NX/etc/node.cfg. (In Ubuntu, this wasn't necessary.)

P.S. The creation of ssh host keys should probably be in the startup script, not in the container image. And of course, no blank-root-password-login nonsense. What I do is to map a volume into the user's home with authorized_keys (so each docker-compose service can have its own keys).