Update Dockerfile to use alpine linux image
This commit is contained in:
parent
0be6450250
commit
8bd56dd731
2 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,3 @@
|
||||||
node_modules
|
node_modules
|
||||||
.git
|
.git
|
||||||
.env
|
.env
|
||||||
|
|
22
Dockerfile
22
Dockerfile
|
@ -1,11 +1,21 @@
|
||||||
FROM iojs:slim
|
FROM mhart/alpine-node
|
||||||
MAINTAINER Jonathan Cremin <jonathan@crem.in>
|
MAINTAINER Jonathan Cremin <jonathan@crem.in>
|
||||||
|
|
||||||
ADD package.json package.json
|
WORKDIR /app
|
||||||
RUN npm install
|
|
||||||
COPY . .
|
RUN apk add --update make gcc g++ python git
|
||||||
|
|
||||||
|
COPY package.json package.json
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
RUN apk del make gcc g++ python git && \
|
||||||
|
rm -rf /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
RUN npm run build
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD npm start
|
CMD ["npm", "start"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue