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
Dockerfile based build plus create postgres-operator images #1066
base: master
Are you sure you want to change the base?
Conversation
… image from scratch
Should this replace the existing Dockerfile? In any case I would put new docker related files into this folder. |
Ok, I've moved it there, but note it's more awkward to use docker.io when file is in a subfolder. |
We will look into this, I like not having to deal with the setup in any way to build and test it. Once we are through with improving kind and e2e this should get some attention. Would also need to understand the Docker hub situation, this may be useful indeed to make everyone's life easier. |
Hi @Jan-M We also want to build using dockerhub. By default, when we connect github repo with dockerhub, it will look for a Dockerfile in the root of the project (hence my request to move this new docker/WithBuildDockerfile to the root of the project and name it Dockerfile). So, it's cleaning the path to create the pgo and its image with zero setup and zero prerequisites. |
Hi @Jan-M @FxKu , |
@@ -9,6 +9,7 @@ COPY build/* / | |||
RUN addgroup -g 1000 pgo | |||
RUN adduser -D -u 1000 -G pgo -g 'Postgres Operator' pgo | |||
|
|||
USER 1000:1000 | |||
USER pgo:pgo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, having "named" user prevents kubernetes to check for non root. I think it would be best to keep as it's now.
plus
All in same Dockerfile.
This solution is ideal when someone wants to test/share an image with their PR directly from docker.io.
Locating this Dockerfile under root of the project, allows docker hub (docker.io) simple and automatic build of images for those forking the project.
Dockerfile builds two versions of the image: one with full alpine os, and a more secure one, from scratch (which is the last one, and the default).
BUILD.md publishes this information plus points to the docs/developer.md .
solves #1067