1 parent 71a2e1d commit 00fa178Copy full SHA for 00fa178
1 file changed
Dockerfile
@@ -1,15 +1,30 @@
1
-FROM mhart/alpine-node:4
+FROM mhart/alpine-node:6
2
3
WORKDIR /src
4
ADD . /src
5
6
+ARG env=production
7
+
8
+RUN apk update
9
10
+ENV PATH /root/.yarn/bin:$PATH
11
12
+RUN apk update \
13
+ && apk add curl bash binutils tar \
14
+ && rm -rf /var/cache/apk/* \
15
+ && curl -o- -L https://yarnpkg.com/install.sh | sh \
16
+ && apk del curl tar binutils
17
18
# If you have native dependencies, you'll need extra tools
-RUN apk add --no-cache make gcc g++ python
19
+RUN apk add --no-cache make gcc g++ git python
20
21
# If you need npm, don't use a base tag
-RUN npm install
22
+RUN NODE_ENV=production yarn install
23
24
+WORKDIR /src
25
+RUN rm -rf .git .gitmodules
26
27
EXPOSE 8080
28
-ENV NODE_ENV production
29
+ENV NODE_ENV $env
30
CMD ["npm", "start"]
0 commit comments