mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-24 18:46:40 +07:00
pass additional args on a build stage
This commit is contained in:
parent
12f27b8307
commit
49a2015510
1 changed files with 15 additions and 0 deletions
|
@ -1,11 +1,26 @@
|
||||||
# stage1 as builder
|
# stage1 as builder
|
||||||
FROM node:erbium-alpine as builder
|
FROM node:erbium-alpine as builder
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
|
|
||||||
RUN yarn
|
RUN yarn
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG REACT_APP_PUBLIC_PATH
|
||||||
|
ARG REACT_APP_API_ADDR
|
||||||
|
ARG REACT_APP_OSRM_URL
|
||||||
|
ARG REACT_APP_OSRM_PROFILE
|
||||||
|
|
||||||
|
ENV REACT_APP_PUBLIC_PATH $REACT_APP_PUBLIC_PATH
|
||||||
|
ENV REACT_APP_API_ADDR $REACT_APP_API_ADDR
|
||||||
|
ENV REACT_APP_OSRM_URL $REACT_APP_OSRM_URL
|
||||||
|
ENV REACT_APP_OSRM_PROFILE $REACT_APP_OSRM_PROFILE
|
||||||
|
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
COPY docker/www/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/www/nginx.conf /etc/nginx/nginx.conf
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
COPY --from=builder /build /usr/share/nginx/html
|
COPY --from=builder /build /usr/share/nginx/html
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue