-
Notifications
You must be signed in to change notification settings - Fork 2
initial commit for docker build #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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM node:14.21.1-alpine | ||
|
|
||
| WORKDIR / | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN npm install | ||
|
|
||
| CMD cat overlay.yaml | node bin.js | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can set the command to be
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was more of a suggestion on how to do it. I'm happy with any way you think would work the best. For example when we use this we are running command: We can adjust to run it any other way. And you are absolutely right about the docker image I used here. Current size is about 140MB. I'm not well versed with Node so I took the first thing I found. Do you want me to add those changes? |
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,4 @@ | ||||||||
| PLATFORM?=linux/amd64 | ||||||||
|
|
||||||||
| build: | ||||||||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. possible solution would be to run npm install here
Suggested change
|
||||||||
| docker buildx build --platform ${PLATFORM} -t overlay-cli . | ||||||||
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.
if makefile runs npm install then there is no need for this line
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.
The full version of
nodeis quite heavy, if we can get away with the alpine version, it would mean a much smaller docker image size. The only caveat is we may need to install git on the alpine version, as it does't come with that.