Files
gemory/Dockerfile
2023-09-16 20:05:25 +02:00

12 lines
483 B
Docker

FROM node:18-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . ./
RUN npm run build
FROM nginx
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf.template /etc/nginx/conf.d/default.conf.template
RUN echo "envsubst '$ESI_USER_AGENT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf" > /docker-entrypoint.d/40-envsubst.sh & chmod +x /docker-entrypoint.d/40-envsubst.sh