mirror of
https://github.com/Lissy93/web-check.git
synced 2025-02-16 10:29:46 +01:00
Refactored Dockerfile
This commit is contained in:
parent
6d8b2368e7
commit
bc45b91b51
23
Dockerfile
23
Dockerfile
@ -1,13 +1,22 @@
|
||||
FROM node:16-buster-slim AS base
|
||||
WORKDIR /app
|
||||
FROM base AS builder
|
||||
COPY . .
|
||||
FROM node:16-buster-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y chromium traceroute && \
|
||||
chmod 755 /usr/bin/chromium && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN npm install --force
|
||||
RUN npm run build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
RUN yarn install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn build
|
||||
|
||||
EXPOSE ${PORT:-3000}
|
||||
|
||||
ENV CHROME_PATH='/usr/bin/chromium'
|
||||
CMD ["npm", "run", "serve"]
|
||||
|
||||
CMD ["yarn", "serve"]
|
||||
|
Loading…
Reference in New Issue
Block a user