I need to install and set-up a docker container unattended on Linux hosts (Raspberry Pi).

This involves first installing docker on the machine and then building the container. This is all done from a script. After the installation of docker I am required to re-login (probably to have user-permissions applied). Then I can install (build & start) the container.

How do I automate this? Is it possible to script a re-login using su?

Browse other questions tagged or ask your own question.