Move install location to /opt
and install globally
This commit is contained in:
parent
0d311ac19c
commit
3caa4a51db
1 changed files with 10 additions and 6 deletions
16
Dockerfile
16
Dockerfile
|
@ -1,12 +1,12 @@
|
||||||
FROM node:8-alpine
|
FROM node:8-alpine
|
||||||
|
|
||||||
COPY ./src /app/src
|
COPY ./src /opt/tstatic/src
|
||||||
COPY ./package.json /app/package.json
|
COPY ./package.json opt/tstatic/package.json
|
||||||
COPY ./package-lock.json /app/package-lock.json
|
COPY ./package-lock.json opt/tstatic/package-lock.json
|
||||||
COPY ./tsconfig.json /app/tsconfig.json
|
COPY ./tsconfig.json opt/tstatic/tsconfig.json
|
||||||
COPY ./site /var/www
|
COPY ./site /var/www
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /opt/tstatic
|
||||||
|
|
||||||
RUN apk add --no-cache git
|
RUN apk add --no-cache git
|
||||||
|
|
||||||
|
@ -18,6 +18,10 @@ RUN npm run build
|
||||||
|
|
||||||
RUN npm prune --production
|
RUN npm prune --production
|
||||||
|
|
||||||
CMD npm start -- /var/www
|
RUN npm install -g .
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
CMD tstatic /var/www
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
Reference in a new issue