Cleanup container and reorder
This commit is contained in:
parent
c74f486b7e
commit
0ec819e232
1 changed files with 9 additions and 8 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,11 +1,5 @@
|
||||||
FROM node:8.10.0-alpine
|
FROM node:8.10.0-alpine
|
||||||
|
|
||||||
RUN mkdir -p /public
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
|
||||||
|
|
||||||
RUN apk add --no-cache git
|
|
||||||
|
|
||||||
COPY ./src /app/src
|
COPY ./src /app/src
|
||||||
COPY ./package.json /app/package.json
|
COPY ./package.json /app/package.json
|
||||||
COPY ./package-lock.json /app/package-lock.json
|
COPY ./package-lock.json /app/package-lock.json
|
||||||
|
@ -13,11 +7,18 @@ COPY ./tsconfig.json /app/tsconfig.json
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN npm install --only=prod
|
RUN mkdir -p /public
|
||||||
RUN npm install --only=dev
|
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
RUN npm prune --production
|
||||||
|
|
||||||
CMD npm start -- /public
|
CMD npm start -- /public
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
Reference in a new issue