2018-07-12 05:30:13 +02:00
|
|
|
FROM node:9 as builder
|
|
|
|
WORKDIR /opt/app
|
|
|
|
|
|
|
|
COPY package.json ./
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
COPY . ./
|
|
|
|
|
|
|
|
ARG BUILD_INFO="docker-latest"
|
|
|
|
ARG CLIENT_BUILD_ARGS=""
|
2018-09-03 23:36:06 +02:00
|
|
|
RUN BASE_URL="__BASEURL__" node build.js --gzip ${CLIENT_BUILD_ARGS}
|
2018-07-12 05:30:13 +02:00
|
|
|
|
|
|
|
|
2019-09-29 01:28:04 +02:00
|
|
|
FROM scratch as approot
|
2018-07-12 05:30:13 +02:00
|
|
|
|
2019-09-29 01:28:04 +02:00
|
|
|
COPY docker-start.sh /
|
2018-07-12 05:30:13 +02:00
|
|
|
|
2019-09-29 01:28:04 +02:00
|
|
|
WORKDIR /etc/nginx
|
|
|
|
COPY nginx.conf.docker ./nginx.conf
|
2018-07-12 05:30:13 +02:00
|
|
|
|
2019-09-29 01:28:04 +02:00
|
|
|
WORKDIR /var/www
|
2018-07-12 05:30:13 +02:00
|
|
|
COPY --from=builder /opt/app/public/ .
|
2019-09-29 01:28:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
|
|
|
RUN apk --no-cache add dumb-init
|
|
|
|
COPY --from=approot / /
|
|
|
|
|
|
|
|
CMD ["/docker-start.sh"]
|
|
|
|
VOLUME ["/data"]
|