werscajk Posted November 18, 2020 Share Posted November 18, 2020 (edited) 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, 2020 by werscajk 3 Quote Link to comment
ich777 Posted November 18, 2020 Share Posted November 18, 2020 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.