admin-panel/frontend/Dockerfile

28 lines
378 B
Docker
Raw Normal View History

FROM node:18-alpine as build
WORKDIR /app
# Install dependencies
COPY package.json .
RUN npm install
# Copy source
COPY . .
# Build
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]