mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-27 23:38:07 +01:00
21c2ac3c09
Fix this error on docker build : ⚠ mozjpeg pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c autoreconf -fiv
22 lines
502 B
Docker
22 lines
502 B
Docker
FROM node:alpine as builder
|
|
|
|
RUN apk update && apk add --no-cache make git python autoconf g++ libc6-compat libjpeg-turbo-dev libpng-dev nasm libtool automake
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY . .
|
|
|
|
RUN yarn install
|
|
RUN yarn build
|
|
RUN rm -rf ./src ./node_modules /usr/local/lib/node_modules /usr/local/share/.cache/yarn/
|
|
RUN mkdir -p /run/nginx
|
|
|
|
FROM nginx:alpine
|
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|