Skip to content
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

Non root dockerfile #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lainedfles
Copy link

Thanks for your work!

Here's my proposed non-root Dockerfile and proposal to use a symbolic link to easily switch between them for building, etc.

@matatonic
Copy link
Owner

Considering this, is there any reason to keep the root only docker?
Also, would rather not use symlinks from git - do they even work on other platforms?

@lainedfles lainedfles force-pushed the non-root-dockerfile branch from b593ff4 to b204076 Compare October 1, 2024 05:06
@lainedfles
Copy link
Author

lainedfles commented Oct 1, 2024

Considering this, is there any reason to keep the root only docker?

Perhaps, depending on your intention and target. I don't see that you're publishing containers images anywhere. If you are, or plan to, setting a limited UID/GID could interfere with some restricted hosting environments.

Also, a change like this requires ownership updates to the filesystem if volumes are utilized. 🤷🏻 Personally, I use podman with a systemd service where a similar process is required:

systemctl --user stop openedai-speech.service
podman run --rm -u root -v openedai-speech-config:/app/config -v openedai-speech-voices:/app/voices -v openedai-speech-cache:/home/app/.cache -it localhost/openedai-speech:latest bash -c 'chown -R app:app /app/config /app/voices /home/app/.cache'
systemctl --user start openedai-speech.service

Also, would rather not use symlinks from git - do they even work on other platforms?

Good point, this likely wouldn't work with Windows 🥲. Reverted.

@matatonic
Copy link
Owner

BTW.
The container images are published on ghcr.io (github), see: https://github.com/matatonic?tab=packages&repo_name=openedai-speech

image: ghcr.io/matatonic/openedai-speech

But good point, maybe an extra nonroot image is the way to go... going to take hours to build all variants now, lol.

@matatonic
Copy link
Owner

I don't use podman myself, but I know some users do. Would you consider contributing what's need (docs updates or scripts) to help people get running with podman?

@lainedfles
Copy link
Author

BTW. The container images are published on ghcr.io (github), see: https://github.com/matatonic?tab=packages&repo_name=openedai-speech

image: ghcr.io/matatonic/openedai-speech

But good point, maybe an extra nonroot image is the way to go... going to take hours to build all variants now, lol.

Thank you. I'd suggest that this should be in the readme. I may send another PR your way!

I don't use podman myself, but I know some users do. Would you consider contributing what's need (docs updates or scripts) to help people get running with podman?

I'm willing to try!

@matatonic
Copy link
Owner

I converted the last release of openedai-vision to non-root container, and will make the next release of -speech non-root as well (when I get some more time!) Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants