-
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
Updating to containerize the app for Docker #47
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.
This is neat. Really awesome stuff. I think we can remove even that line, which means maybe we don't need a Dockerfile and can instead just rely on docker-compose.
Dockerfile
Outdated
|
||
RUN apt-get update | ||
RUN apt-get install yarn | ||
RUN apt-get update && apt-get install apt-transport-https |
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.
We should no longer need this line because apt-transport-https is purely for getting yarn
.
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.
@zachary-kuhn You're absolutely right haha.
I'll play around this and look into maybe just having a |
@zachary-kuhn I made some changes. Let me know what you think. |
a016d1d
to
770d96b
Compare
Dockerfile
… are now self-contained, update README.md
291fa92
to
184e009
Compare
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 haven't pulled this down and tried it yet, but at first pass it looks good to me.
ports: | ||
- '8080:8080' | ||
- "8080:8080" |
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.
Why change this to double quotes and above to single? Will one or the other not work?
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.
WHY?
The official docker NodeJS images include
yarn
so there is no longer a need to install it in theDockerfile
References:
WHAT?
yarn
in the `Dockerfile (it's included in the Node images now)Dockerfile
would only work when you were running the service withdocker-compose
since you had a shared volume between your host machine and the container, but if you just tried to build the image and then tried to run it it would fail because in the build process no source code was moved into the container.node
image to the latest LTS slim image.apt-get update
andapt-get install
on the same line concatenated with&&
to take advantage of docker caching and proper cache-busting. Refer to theRun
section here.node_modules
,node
,yarn
, etc.) except maybegit
and a text editor.