-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hackathon - Dockerfile improvements & Github CI docker image publish #3
Merged
rcarback
merged 26 commits into
xxfoundation:main
from
dadatuputi:hackathon-docker-build
Nov 8, 2024
Merged
Hackathon - Dockerfile improvements & Github CI docker image publish #3
rcarback
merged 26 commits into
xxfoundation:main
from
dadatuputi:hackathon-docker-build
Nov 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dadatuputi
force-pushed
the
hackathon-docker-build
branch
from
November 1, 2024 09:52
229ce9e
to
1c2bb2b
Compare
dadatuputi
force-pushed
the
hackathon-docker-build
branch
from
November 1, 2024 10:37
1c2bb2b
to
86a9d7f
Compare
86a9d7f - Add multi-arch support - linux/amd64 and linux/arm64 Tested for both Dockerfile and local.Dockerfile, results here: https://github.com/dadatuputi/haven/pkgs/container/haven |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dockerfile Updates
fe8d005 - big update to Dockerfile and local.Dockerfile. Both behave essentially the same way, except Dockerfile uses git to clone the git.xx.network repo.
Using the
node:20
base image as a builder andnode:20-slim
as the production image.The primary reason, is the original Ubuntu 20 image has loads of vulnerabilities per Docker Scout:
The new image (with staging) is about half the size (1.2GB vs 2.6GB) and far fewer vulnerabilities per Docker Scout:
Eventually we should move the base image to
node:lts
but currently there's an issue that is interfering with the build process (see nodejs/docker-node#1946)Dockerfile
tries to usenpm ci
(which will usepackage-lock.json
) but falls back tonpm install
, since old branches/tags don't have package-lock.json.Github Action - Automatically build and publish on v* tags or on-demand
418e0f7 - This action will:
local.Dockerfile
- check out a specific tag or branch, build and publishDockerfile
- gets the latest Dockerfile and passes in the branch/tag ref which then builds and publishesYou can see the dockerfiles I've built at https://github.com/dadatuputi/haven/pkgs/container/haven
The process for manual building looks like:
Other Commits
b0e10ca - optional npm run script (
npm run build:analyze
) that will produce some nice artifacts for future optimizationsb6a706a - small optimization to move some dependencies to dev