Docker container not respecting version settings

Is the local docker container supposed to use the netlify.toml build.environment settings of the project I’m getting it to build?
For some reason it seems not to use the specified node, npm and ruby versions.

hey @megant - i moved this out into its own thread as it is kind of a unique question. Feel free to edit the title or add information as you feel is necessary.

Can you tell us what you tried? it would also be useful to see your netlify.toml.

Hi @perry,
I had no problems with the first part of the build process of my docker container yesterday, but now my build runs into an error when starting to install sharp (specifically: sharp@0.23.1).
I thought if I’d set the node and npm versions in the netlify.toml file, I could at least make sure that these versions aren’t the cause of the problem.

This is what my netlify.toml file looks like:

[build.environment] NODE_VERSION = "10.16.0" NPM_VERSION = "6.10.3" RUBY_VERSION = "2.4.3"

I do not believe the container will use those values specified in netlify.toml. Here’s how to run the build to incorporate any variables you’d like:

buildbot@21c3d7658df9:/$ export NODE_VERSION = "10.16.0" NPM_VERSION = "6.10.3" RUBY_VERSION = "2.4.3"
buildbot@21c3d7658df9:/$ build your-build-command-here

This is a bit complicated but the way we call your command is a bit complicated too so this “works around” that complication without requiring you to understand arcane unix shell configuration details :slight_smile:

Let me know if that doesn’t work better, please!