omni-tools/Dockerfile

21 lines
424 B
Docker
Raw Normal View History

2025-02-25 06:24:00 +00:00
FROM node:20 AS build
2024-07-11 03:33:37 +01:00
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
2025-07-25 17:48:42 +01:00
COPY mime.types /etc/nginx/mime.types
2024-07-11 03:33:37 +01:00
COPY --from=build /app/dist /usr/share/nginx/html
RUN sed -i 's|index index.html index.htm;|index index.html index.htm;\n try_files $uri $uri/ /index.html;|' /etc/nginx/conf.d/default.conf
2024-07-11 03:33:37 +01:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]