Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndreiTelteu/bb15c78a9d628a59971974b7c338abff to your computer and use it in GitHub Desktop.
Save AndreiTelteu/bb15c78a9d628a59971974b7c338abff to your computer and use it in GitHub Desktop.
If you have fnm inside a docker container and you want to run a node/npm/yarn command using a specific version of node, fron the host, using docker exec

Example of how to run yarn run prod using yarn package from fnm:

docker exec -i -w /home/of/your/project docker-container-name bash -c "/root/.fnm/fnm exec --using 12 yarn run production"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment