APC Australia

Quality of life

Tunning a Docker server? You’ll want to be as hands-off as possible.

-

That means giving Docker slightly more access, but on the flip side, it means a slight reduction in security, so it’s up to you if you wish to follow these steps. First, create a new group just for Docker by using sudo groupadd docker , then add your current user to the docker group with sudo usermod -aG docker $ USER . Log out, then log back in, and you should now be able to run Docker commands (try docker run helloworld ) without prepending them with “sudo”. If you see an error, it’s probably a permission­s issue with your ~/.docker/ folder, caused by using “sudo” previously; you can either kill your existing folder with rm -f ~/.docker/ and start again, or give the folder the appropriat­e permission­s, first with sudo chown “$ USER”:”$ USER” / home/”$ USER”/.docker -R , then with sudo chmod g+rwx “/home/ $ USER/.docker” -R . Make sure you offer similar permission­s to other folders you create, for storing data or media in your containers.

It’s handy to have Docker run automatica­lly upon boot, so you don’t need to grab your peripheral­s (or log in via SSH) to get your server back up and running if you power cycle. Just add Docker to Systemd, the Linux component that (in most modern distributi­ons) deals with managing the processes that run at boot time, by running sudo systemctl enable docker within your command line. Type systemctl to check it’s worked — dig through the list until you see “docker.service” listed. If you ever change your mind, you can reverse the action with (you guessed it) sudo systemctl disable docker .

Newspapers in English

Newspapers from Australia