-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: update main docker file to use multistage build
We can do away with the build / dist files
- Loading branch information
1 parent
d3e98a8
commit 0f2e706
Showing
7 changed files
with
24 additions
and
29 deletions.
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ npm-debug.log | |
payload.txt | ||
coverage/ | ||
tutorials/ | ||
*.tgz |
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,14 +1,28 @@ | ||
FROM mhart/alpine-node:7 | ||
# -- NODE 8 | ||
FROM mhart/alpine-node:8 AS base | ||
ENV storage__path /var/data/skyring | ||
ENV NODE_ENV=development | ||
COPY . /opt/skyring | ||
ENV NODE_ENV=production | ||
|
||
# -- BUILD | ||
FROM base AS build | ||
|
||
COPY package*.json /opt/skyring/ | ||
WORKDIR /opt/skyring | ||
|
||
RUN apk update && \ | ||
apk upgrade && \ | ||
mkdir -p /var/data/skyring && \ | ||
apk add python make g++ git && \ | ||
npm install | ||
|
||
RUN mv node_modules prod_node_modules | ||
|
||
FROM base AS skyring | ||
RUN mkdir -p /var/data/skyring | ||
WORKDIR /opt/skyring | ||
VOLUME /etc | ||
VOLUME /var/data/skyring | ||
|
||
COPY --from=build /opt/skyring/prod_node_modules ./node_modules | ||
COPY . . | ||
CMD ["node", "index.js"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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