Skip to content

Container build failing in Docker when react-snap is enabled #132

@lewisdonovan

Description

@lewisdonovan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions