My app works fine locally but I can't for the life of me get it to build in Docker. It works fine when I disable react-snap, but any time it's enabled, the build fails while building the image in Jenkins. My Dockerfile is pasted below, it's based mostly on what I've got from our server engineers:
FROM node:8-alpine as builder
COPY . /working/
RUN cd /working && yarn install && yarn run build
FROM nginx:mainline-alpine
COPY --from=builder /working/build /usr/share/nginx/html
COPY config/nginx.conf /etc/nginx/conf.d/main.conf
I have the following in my package.json as well:
"reactSnap": {
"puppeteerArgs": ["--no-sandbox"],
"concurrency": 1,
"inlineCss": false
}
Any ideas where I'm going wrong? Cheers.