Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with Docker #68

Open
danmcnulty opened this issue Oct 16, 2019 · 1 comment
Open

Build with Docker #68

danmcnulty opened this issue Oct 16, 2019 · 1 comment

Comments

@danmcnulty
Copy link

Hi,
We're trying to set this up within our CI system by creating an image which contains just the build tool, so a subsequent CI step can run the image using a volume containing our code.

Whenever we run yarn we receive a number of warnings such as these:

[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning " > [email protected]" has unmet peer dependency "webpack@>=2.0.0 <5.0.0".
warning " > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "gatsby-plugin-flow > @babel/preset-flow > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "gatsby-plugin-flow > @babel/preset-flow > @babel/plugin-transform-flow-strip-types > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.0.0".
warning " > [email protected]" has incorrect peer dependency "eslint@^4.9.0".
[4/4] Building fresh packages...
error /app/node_modules/sharp: Command failed.
Exit code: 1

Do you use Docker for development at all, and if so do you have a working Dockerfile which you could share?
Thanks

@szopkap
Copy link

szopkap commented Dec 21, 2019

I only use docker for build and run the prod version. Here is mine dockerfile:

FROM node:10.15.3 as source
WORKDIR /src/progression-framework
COPY package.json ./
RUN npm install
COPY . ./
RUN rm -rf node_modules/sharp
RUN npm install --arch=x64 --platform=linux --target=10.15.3 sharp
RUN npm run build
  • I add gatsby-cli to dependencies (package.json)

The error caused by the sharp module. This version only runs at Windows OS. Need to change a linux specific one.

Some other dependencies need to update to a fresher version, that's why the many warnings, but the application still runs with these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants