-
Notifications
You must be signed in to change notification settings - Fork 609
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 improvements #2876
Dockerfile improvements #2876
Conversation
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.
Great work. Thank you @niccoloraspa . LGTM once comments are addressed
--build-arg GIT_COMMIT=$(COMMIT) \ | ||
-f Dockerfile . | ||
|
||
docker-build-nonroot: |
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.
Does docker-build-debug
need to be updated?
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.
Yes, but not because of these changes.
There is no longer a "debug" osmosis image.
I have opened this issue to remove it: #2853
Co-authored-by: Roman <roman@osmosis.team>
Co-authored-by: Roman <roman@osmosis.team>
* Replace hardcoded version in checksum verification and merge cosmwasm layers * Avoid copying .git folder * Add relevant commands to Makefile * Update .dockerignore Co-authored-by: Roman <roman@osmosis.team> * Update .dockerignore Co-authored-by: Roman <roman@osmosis.team> Co-authored-by: Roman <roman@osmosis.team> (cherry picked from commit a39c9d6)
* Replace hardcoded version in checksum verification and merge cosmwasm layers * Avoid copying .git folder * Add relevant commands to Makefile * Update .dockerignore Co-authored-by: Roman <roman@osmosis.team> * Update .dockerignore Co-authored-by: Roman <roman@osmosis.team> Co-authored-by: Roman <roman@osmosis.team> (cherry picked from commit a39c9d6) Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com>
Closes:
What is the purpose of the change
This PR improves our
Dockerfile
by:.dockerignore
with more folders.$WASMVM
was hardcoded for the checksumNow builds are significantly faster due to better use of layer caching and previous work by @ValarDragon on the
go build
go mod download
cache.I have also added the relevant commands in the
Makefile
:make docker-build
builds local docker image using the defaultdistroless
runner imagemake docker-build-distroless
same as abovemake docker-build-alpine
builds local docker image using thealpine
runner imagemake docker-build-nonroot
builds local docker image using thedistroless-nonroot
runner imageBrief Changelog
Dockerfile
.dockerignore
Testing and Verifying
docker build -t osmosis:local .
You should see an empty line as output because there is no version set.
To set a version:
To get the correct values programmatically:
or more simply:
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no