November 18, 20205 yr I had quite a hard time figuring out how to persistently create user only for docker without giving root access to Gitlab in CI/CD pipeline. If you do normal unix suff with adduser, passwd and so on you will loose all of that after reboot. In the end it was quite easy. So I'm going to share with you all to save you three days I spent with this stupidly trivial task. You just need to do this: Create new user with password via Web Managment of UnRAID in USERS tab. Let's call this new user deployer. Change deployers default group with: usermod -g docker deployer Edit /etc/passwd manually (not recomended, but this is small change) Find line with deployer Change from /bin/false to /bin/bash to allow ssh access for deployer Save copy /etc/passwd to /boot/passwd with: cp /etc/passwd /boot/passwd DONE! That's IT! It just works. Now you have persistent user that you can add to Gitlab (or Github or whatever else) and automatically deploy your things from CI/CD pipeline straight to Docker on your UnRAID machine. Edited November 18, 20205 yr by werscajk
November 18, 20205 yr I do this with a headless VM on Unraid with Docker installed and exposed the Docker service via a TCP port to my internal network so i could use it in Jenkins/Gitea and it's completely isolated. Thanks for sharing.
Archived
This topic is now archived and is closed to further replies.