Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Feature]: Full rootless Docker support #2387

Closed
peaklabs-dev opened this issue Jun 8, 2024 · 3 comments
Closed

[Feature]: Full rootless Docker support #2387

peaklabs-dev opened this issue Jun 8, 2024 · 3 comments

Comments

@peaklabs-dev
Copy link
Member

Description

Support full rootless Docker. On localhost (coolify instance) and on connected remote servers.
This will greatly improve the security of the coolify containers and the services running on them, as rootless Docker isolation is required to truly separate each container.
cc @DeVoresyah

Minimal Reproduction (if possible, example repository)

Exception or Error

No response

Version

@peaklabs-dev
Copy link
Member Author

Good article: https://medium.com/@mccode/processes-in-containers-should-not-run-as-root-2feae3f0df3b

  • This should be possible with Docker.
  • A second thing to consider is implementing podman for better security, or even as an addition to docker, since it runs more securely by default (rootless). https://podman.io/

@peaklabs-dev
Copy link
Member Author

Some more help to implement:
To run Docker as a router, we need to use custom Docker images for all services (so we essentially need to rewrite the services a bit) as we need to use the yml file and the a custom dockerfile for each service:
Issue that adds this: #2552

  1. In each service folder there should be a service.yml file and a custom service.dockerfile, so for example for WordPress: wordpress.yml and DOCKERFILE inside the wordpress service folder.
  2. In the custom docker file we use the flowing command to create a random user that does not have root privileges and disable the root user:
RUN groupadd -r <user> && useradd -r -g <group> <user>
RUN chsh -s /usr/sbin/nologin root
  1. In the yml file we access the image something like this:
service:
    build:
      context: .

@andrasbacsai if you need more help just let me know.

@rohankm
Copy link

rohankm commented Jun 22, 2024

+1

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants