Skip to content

Conversation

Spirit-act
Copy link

This merge request aims to allow the plugin-server to run as non-root. It also tries to reduce the image size and remove unnecessary dependencies.

This Container should no be able to run in a hardened Kubernetes cluster which enforced non-root containers.

Changes

Dockerfile

  • Use a multistage Build to separate build stage from final prod stage
  • exclude dev dependencies from final build
  • set some default env variables

Code

  • change export path of files to tmp folder. Every User can write to the tmp folder.

Disclaimer

This is not tested for development, but I assume, that development is not done within the container.

I'm also not very familiar with this codebase and therefor no application testing was done except for simple startups.

- change export path of files to tmp folder
- restructure Dockerfile
  - build with non root user (as far as possible)
  - use multistage build for smaller images
  - exclude dev dependencies from prod build
  - set default env variables

Signed-off-by: Spirit-act <[email protected]>
Signed-off-by: Spirit-act <[email protected]>
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.

1 participant