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

Optimize and secure Docker image #858

Open
ix5 opened this issue May 4, 2022 · 1 comment
Open

Optimize and secure Docker image #858

ix5 opened this issue May 4, 2022 · 1 comment
Labels
improvement Not a new feature, but makes Isso more pleasant to use needs-contributor Someone needs to implement this. Help wanted! testing/ci Test coverage & GitHub actions etc.
Milestone

Comments

@ix5
Copy link
Member

ix5 commented May 4, 2022

The Dockerfile might be using non-optimal base images and have too many steps as of now.

I'm no docker expert and pretty much just threw together what I saw in other projects in order to make the image work with newer npm packages in #841.

For instance, we might drop the root user, use some kind of tighter sandboxing, use signed images, only expose to localhost instead of 0.0.0.9, ...

I found following potentially relevant material:

Maybe wonderfall has a few ideas, seeing souramoo/commentoplusplus#89 and that they maintain(ed) https://github.com/wonderfall/docker-isso

Also: Allow configuration through environment variables passed to docker image. Related: #397

Putting on backburner for now.


Another idea: Passing environment variables to the image, to be used instead of a config file. Requires general support for parsing env variables, see #397

@ix5 ix5 added needs-contributor Someone needs to implement this. Help wanted! testing/ci Test coverage & GitHub actions etc. improvement Not a new feature, but makes Isso more pleasant to use labels May 4, 2022
@ix5 ix5 added this to the backburner milestone May 4, 2022
@dbrgn
Copy link

dbrgn commented Jun 19, 2022

Another aspect: Automatically build and push the currently supported version(s) on a regular basis (e.g. every week). This ensures that security updates in base images are applied automatically.

Here's an example on how it could work, if you only support a single stable version: https://github.com/dbrgn/churz/blob/f0a27a9792c8064296077c0a4d444e79412806ec/.github/workflows/ci.yml#L31-L49 (Note the "schedule" trigger at the top.) For publishing multiple supported versions, some scripting would be required. Maybe something similar to this: https://github.com/threema-ch/threema-web/blob/master/docker/rebuild.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a new feature, but makes Isso more pleasant to use needs-contributor Someone needs to implement this. Help wanted! testing/ci Test coverage & GitHub actions etc.
Projects
None yet
Development

No branches or pull requests

2 participants