I am trying to deploy a rescript app, which is built (rescript build) on circle ci, and then deployed to fly.io via a Dockerfile.
During the deploy in the Dockerfile, we run a RUN yarn install and a CMD ["yarn", "start"]
I am having issues with rescript being installed on the machine, random python errors, etc.
What I am SUPER confused by is why is rescript being installed, or called, or anything at this point, the app was already built on a prior step, we are simply trying to run the built artifact with next-boost (next with cache). rescript is a devDependency and should not be installed or called at any point when calling “yarn install”, correct?
originally was trying with FROM node:current-alpine
Either way, it makes ZERO sense that ANYTHING rescript is running or being installed during “yarn install” as its a devDependency and the project has already been successfully built on a prior step before deploying via a Dockerfile.
it makes no sense that rescript should be involved at all at this step
It might be that some of your dependencies make rescript dependencies instead of dev-dependencies + alpine distribution does not work with our prebuilt image.
If you use npm, you can add -ignore-scripts to avoid the compiler being built
This may help: https://github.com/ocaml/v3.ocaml.org/blob/master/Dockerfile . I wasn’t involved with producing it, just forwarding it along. The goal of the docker image was to house the static export results (more like a tar ball than a traditional docker service image) which would be served by a generic http server.