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

Dockerization design principles #19

Closed
dr-orlovsky opened this issue Sep 24, 2020 · 2 comments
Closed

Dockerization design principles #19

dr-orlovsky opened this issue Sep 24, 2020 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@dr-orlovsky
Copy link
Member

dr-orlovsky commented Sep 24, 2020

After some discussions with @zoedberg in #17 I propose to discuss and then codify design principles we are using for dockerization (Dockerfile design and docker-compose containers). Right now this is an issue, but later once we agree on it I propose to put it as a part of README.md file in this repo.

So my initial take on that:

  1. When you do not need to expose RPC ports to the external world leave them exposed only through docker-compose expose but not port command
  2. In docker-compose connectivity always rely on internal network only; since there might be alternative compose files using same ports on the same IP addresses (for instance for scalability purposes)
  3. Customize as much as possible with environment variables ARG variables
  4. Structure ENTRYPOINT in a way that it can be extended with compose command args later; but if this conflicts with (3) the (3) must have a higher priority and customization in compose file with custom entrypoint is should be preferred.
  5. For RPC use macaroons/files whenever possible (not implemented yet, needs a separate issue).
  6. Run container processes using an unprivileged user instead of root.
@dr-orlovsky dr-orlovsky added documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested labels Sep 24, 2020
@dr-orlovsky dr-orlovsky added this to the RGB LN milestone Sep 24, 2020
@dr-orlovsky dr-orlovsky added this to To do in Software stack & toolchain via automation Sep 24, 2020
@zoedberg
Copy link
Member

I agree.

I think that another point to discuss is that it's safer to run container processes using an unprivileged user instead of root.

@dr-orlovsky
Copy link
Member Author

Good point! Actually with the latest refactoring in #21 it is already done

@dr-orlovsky dr-orlovsky moved this from To do to In progress in Software stack & toolchain Sep 30, 2020
Software stack & toolchain automation moved this from In progress to Done Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested
Projects
No open projects
Development

No branches or pull requests

2 participants