You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: Dockerfile
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,31 @@
1
-
FROM node:8.9-alpine
1
+
FROM node:alpine
2
2
LABEL Description="This image is used to start the hc-api-feathers" Vendor="Human-Connection gGmbH" Version="1.0" Maintainer="Human-Connection gGmbH ([email protected])"
3
3
4
4
# expose the app port
5
5
EXPOSE 3030
6
6
7
-
# override configuration by instance name in docker container
8
-
ENV NODE_APP_INSTANCE=docker
9
-
ENV NODE_ENV=production
10
-
11
-
# update unix packages
12
-
RUN apk update && apk upgrade
13
-
RUN rm -rf /var/cache/apk/*
14
-
RUN yarn global add pm2
15
-
16
7
# create working directory
17
8
RUN mkdir -p /API
18
9
WORKDIR /API
19
10
11
+
# --no-cache: download package index on-the-fly, no need to cleanup afterwards
12
+
# --virtual: bundle packages, remove whole bundle at once, when done
13
+
RUN apk --no-cache --virtual build-dependencies add python make g++
14
+
15
+
RUN yarn global add pm2
16
+
20
17
# install app dependencies
21
18
COPY package.json /API
22
19
COPY yarn.lock /API
23
20
RUN yarn install --frozen-lockfile --non-interactive
24
21
22
+
RUN apk del build-dependencies
23
+
24
+
# override configuration by instance name in docker container
0 commit comments