play-nine/dockerfile

23 lines
445 B
Plaintext

# build environment
FROM node:12 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm run build
# production environment
FROM node:12
RUN printf '\n\n- Copy application files\n'
ARG APP_SUBFOLDER=play-nine
COPY --from=builder /app/build ./application/${APP_SUBFOLDER}
COPY --from=builder /app/build/index.html ./application/
RUN npm install -g serve@11.3.0
EXPOSE 80
CMD ["sh","-c","serve -s application -p 80"]