joinpeertube/docker/Dockerfile

25 lines
521 B
Docker

FROM node:13-alpine as build-stage
WORKDIR /app
COPY package.json .
RUN yarn install --pure-lockfile \
&& yarn cache clean
COPY src/ src/
COPY public/ public/
COPY yarn.lock .
COPY .eslintrc.js .
# TODO: the build works fine with only the above files, does that mean we can delete everything else?
#COPY vue.config.js .
#COPY postcss.config.js .
#COPY .eslintrc .
RUN yarn run build
FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY docker/nginx.conf /etc/nginx/nginx.conf