Optimise dockerfile

This commit is contained in:
Fred Boniface 2023-06-28 22:01:09 +01:00
parent 85ce074c88
commit 15d9843f06

View File

@ -5,10 +5,9 @@ COPY package.json /
COPY package-lock.json / COPY package-lock.json /
RUN npm install RUN npm install
COPY . ./ COPY . ./
RUN npm run build RUN npm run build
FROM nginx:alpine-slim FROM nginx:alpine-slim
COPY --from=build /app/build /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/build /usr/share/nginx/html
RUN chown -R nginx:nginx /usr/share/nginx/html RUN chown -R nginx:nginx /usr/share/nginx/html