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

Faster docker build. #1235

Merged
merged 1 commit into from
Nov 11, 2021
Merged

Faster docker build. #1235

merged 1 commit into from
Nov 11, 2021

Conversation

pulquero
Copy link

@pulquero pulquero commented Nov 6, 2021

Moved the config into a layer post "composer install" to speed up build when only changing config.

Copy link
Collaborator

@kinow kinow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Ok to me. Only issue is remembering to update image should directory layout changes. I'm not sure which option I prefer, faster build or simpler maintenance.

@pulquero
Copy link
Author

pulquero commented Nov 6, 2021 via email

@kinow
Copy link
Collaborator

kinow commented Nov 6, 2021

@pulquero I think I see what you mean. If the source lived in a directory like src, and the config elsewhere, maybe in a config folder, then we could have two distinct layers, building or re-building the image would be much faster, and maintenance of source & docker files would also be quite easy. Let's wait and see what others think too 👍

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@pulquero
Copy link
Author

pulquero commented Nov 8, 2021

Here, found a way to get the php packages into their own layer.

Copy link
Collaborator

@kinow kinow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great fix @pulquero ! Not approving because I didn't have time to try it out locally, but in principle looks like a great improvement, with little to no difference in maintenance for devs 👏

@miguelvaara miguelvaara merged commit 4f33798 into NatLibFi:master Nov 11, 2021
@miguelvaara
Copy link
Contributor

miguelvaara commented Nov 11, 2021

The the building phase was clearly faster after changing the configuration. Nice work!

Thanks @pulquero for the PR and thanks @kinow for your commenting.

@osma osma added this to the 2.13 milestone Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants