-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(docker): Add comments to the docker config files to make them e…
…asy to understand.
- Loading branch information
1 parent
971295b
commit 86f8187
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
# The Dockerfile is the description of all the commands to run to assemble the image. | ||
# Read about all the commands here: https://docs.docker.com/engine/reference/builder/ | ||
|
||
# We also have a docker-compose.yml file, which is used to build and run this Docker image. | ||
|
||
|
||
# Start from the official Node 6 alpine image. https://hub.docker.com/_/node/ | ||
FROM node:6-alpine | ||
|
||
COPY . /app | ||
# Set the working directory for following commands. | ||
WORKDIR /app | ||
|
||
# Copy only the files necessary to install dependencies into the working directory. | ||
# Docker builds the image in layers and caches them. Because the app files change more often than the dependencies, we | ||
# copy the app files only after we install the depencendies. | ||
COPY package.json yarn.lock .npmrc ./ | ||
|
||
# Install dependencies. | ||
RUN yarn install | ||
|
||
# Copy all source and test files into the working directory. | ||
# We use a .dockerignore file to prevent unnecessary or large files from being inadvertently copied. | ||
COPY . /app | ||
|
||
# Build the app. | ||
RUN yarn build | ||
|
||
# The entrypoint configures the container to be run as an executable. | ||
# Arguments supplied on the command line will be forwarded onto the entrypoint. | ||
ENTRYPOINT ["yarn"] |
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