amper43
6 years ago
1 changed files with 15 additions and 18 deletions
@ -1,25 +1,22 @@ |
|||||||
#base image |
FROM python:3.6.6 |
||||||
FROM node:carbon AS base |
|
||||||
|
|
||||||
#dependencies |
VOLUME [ "/var/www/data" ] |
||||||
FROM base AS dependencies |
|
||||||
WORKDIR /var/www/server |
|
||||||
COPY package*.json ./ |
|
||||||
RUN npm install |
|
||||||
|
|
||||||
#build |
COPY server /var/www/ |
||||||
FROM dependencies AS build |
|
||||||
COPY . /var/www/server |
|
||||||
WORKDIR /var/www/server |
|
||||||
RUN npm run build |
|
||||||
|
|
||||||
#release |
|
||||||
FROM node:8.9-alpine AS release |
|
||||||
WORKDIR /var/www/server |
WORKDIR /var/www/server |
||||||
COPY --from=dependencies /var/www/server/package.json ./ |
|
||||||
RUN npm install |
RUN apt-get install curl \ |
||||||
COPY --from=build /var/www/server ./ |
bash \ |
||||||
|
gnupg \ |
||||||
|
make \ |
||||||
|
g++ \ |
||||||
|
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ |
||||||
|
&& apt-get update \ |
||||||
|
&& apt-get install nodejs \ |
||||||
|
&& npm install \ |
||||||
|
&& npm run build |
||||||
|
|
||||||
ENV INSIDE_DOCKER true |
ENV INSIDE_DOCKER true |
||||||
VOLUME [ "/var/www/data" ] |
|
||||||
CMD ["npm", "start"] |
CMD ["npm", "start"] |
||||||
|
Loading…
Reference in new issue