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

Update exercise 01-01-01 and solution to use most recent node Alpine #3

Merged
merged 2 commits into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 01-docker/01-docker/EXERCISE-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ EXPOSE 80

Notes about the _Dockerfile_ (refer to the [Dockerfile reference](https://docs.docker.com/reference/builder/)) for more details):

- `FROM` specifies the base image to build our image upon (_node:10.11.0-alpine_ contains the NodeJS runtime)
- `FROM` specifies the base image to build our image upon (_node:15.4.0-alpine_ contains the NodeJS runtime)
- `COPY` simply copies a file from the host file system to the image filesystem
- `EXPOSE` identifies the network ports the container will listen on
- `CMD` specifies the executable to run when a container is started from the image (we are using the _exec_ form)
Expand Down
10 changes: 7 additions & 3 deletions 01-docker/01-docker/solution/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM node:10.11.0-alpine
RUN npm install express redis
FROM node:15.4.0-alpine

COPY files/ /files/
COPY webui.js /
COPY webui.js /files/webui.js

WORKDIR /files
RUN npm install express redis

CMD ["node", "webui.js"]
EXPOSE 80