retropilot-client/Dockerfile

22 lines
351 B
Docker
Raw Permalink Normal View History

2022-01-10 12:47:55 -07:00
FROM node:16-alpine AS builder
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm ci
2022-01-10 15:44:50 -07:00
ARG PUBLIC_URL
ENV PUBLIC_URL $PUBLIC_URL
ARG API_URL
ENV API_URL $API_URL
2022-01-10 12:47:55 -07:00
# Build the app
COPY . .
RUN npm run build
2022-01-10 18:17:45 -07:00
FROM nginx:1.20-alpine
2022-01-10 12:47:55 -07:00
2022-01-10 15:44:50 -07:00
COPY --from=builder /app/build /usr/share/nginx/html
2022-01-10 12:47:55 -07:00
COPY nginx.conf /etc/nginx/conf.d/default.conf