-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Rework dev & prod container builds #7017
Rework dev & prod container builds #7017
Conversation
Build failed.
|
Well, that's one way to break zuul. |
recheck |
Build failed.
|
Use only one (templated) docker file for both builds. Move to two-stage container builds in order to save space in the final image.
Build failed.
|
recheck |
Build failed.
|
Build failed.
|
recheck |
Build succeeded.
|
recheck |
Build succeeded.
|
recheck |
Build succeeded.
|
recheck |
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
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.
I've tested this in OpenShift, the dev env on linux, and the dev env on docker for Mac.
@@ -35,6 +35,7 @@ rsyslog.pid | |||
/tower-license | |||
/tower-license/** | |||
tools/prometheus/data | |||
tools/docker-compose/Dockerfile |
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.
Build failed (gate pipeline). For information on how to proceed, see
|
regate |
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.
I also tested this out locally and it works as expected
Build succeeded (gate pipeline).
|
SUMMARY
Two main items:
The easiest way to make sure changes to the container builds don't get out of sync between the dev environment and prod containers is to only have one (templated) Dockerfile. So do that.
Move to two-stage container builds in order to save space in the final image.
By building in one container step, and then just copying the built artifacts into the final containers, we can save a lot of space.
Before:
After:
Changes while here:
Smoke tested with starting AWX & running demo playbook on Fedora 32 for both dev env and local docker prod. Definitely needs testing on OSX (dev env) and OCP/K8S (prod).