-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update image to run as a non root user #47
base: main
Are you sure you want to change the base?
Conversation
Kudos, SonarCloud Quality Gate passed! |
Thanks for the contribution! This base image looks massive though, and contains unnecessary things. I've triggered the GH Actions though, and we'll see if that works. I would rather fix my own base image than use this at the moment however. 41 MiB -> 182 MiB is quite the leap, and I doubt any of those bytes actually help with the permissions. |
@insuusvenerati Does this look correct to you? I will make similar changes to this repo, but that PR should sort out the base image. |
I'll spin up a server with that PR tonight and check it out! At first glance, it does look good. |
It's not quite ready yet. Running into some issues. Definite progress though. I now understand what I was doing wrong when I initially tried this. |
Your tests are what is broken now. Try this: - name: Make Docker Directories
if: matrix.system == 'docker' || matrix.system == 'docker-compose'
run: |
mkdir ZomboidConfig ZomboidDedicatedServer
sudo chown -R 1000:1000 ZomboidConfig ZomboidDedicatedServer
- name: Make Podman Directories
if: matrix.system == 'podman'
run: |
mkdir ZomboidConfig ZomboidDedicatedServer
podman unshare chown 1000:1000 $(pwd)/ZomboidDedicatedServer
podman unshare chown 1000:1000 $(pwd)/ZomboidConfig |
This PR updates the image to run as a non root user. To reduce the amount of changes, I simply changed the base image to use
cm2network/steamcmd:latest
.The reason for this is that https://github.com/CM2Walki/steamcmd is already configured to run as a non root user with steamcmd existing in
/home/steam/steamcmd.sh
and the valve wiki for SteamCMD points to it. https://developer.valvesoftware.com/wiki/SteamCMD#Docker