137a5828df
@mui/icons-material needs much time to install and raises the overall yarn install time to about 150 seconds Change-Id: Ibe9808554c97d0991a336d3c7588502af8505a3f
21 lines
352 B
Docker
21 lines
352 B
Docker
# Builder
|
|
FROM node:lts as builder
|
|
|
|
ARG PUBLIC_URL=/
|
|
ARG REACT_APP_SERVER
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . /src
|
|
RUN yarn --network-timeout=300000 install
|
|
RUN PUBLIC_URL=$PUBLIC_URL REACT_APP_SERVER=$REACT_APP_SERVER yarn build
|
|
|
|
|
|
# App
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /src/build /app
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
&& ln -s /app /usr/share/nginx/html
|