tealk
(Tealk)
June 23, 2024, 10:39am
1
Hello everyone,
I want to use the toolbox to use Node.js, but I have to use some variables in the build command.
Since I would like to use this in ansible I thought it can be used with toolbox run -c
, but I don’t understand how to pass the variables.
PHANPY_CLIENT_NAME="Phanpy Dev" \
PHANPY_WEBSITE="https://dev.phanpy.social" \
PHANPY_DEFAULT_INSTANCE=hachyderm.io \
PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL=https://hachyderm.io/auth/sign_up \
PHANPY_PRIVACY_POLICY_URL=https://hachyderm.io/privacy-policy \
npm run build
But if i try it i get this error:
bash: line 1: exec: PHANPY_CLIENT_NAME=Phanpy Dev not found
Error: command PHANPY_CLIENT_NAME=Phanpy Dev not found in container nodejs
jakfrost
(Stephen Douglas Snow)
June 23, 2024, 10:51am
2
tealk
(Tealk)
June 23, 2024, 10:52am
3
Ok apparently it works if you tag the variables with env
toolbox run -c nodejs env PHANPY_CLIENT_NAME="Phanpy Dev" env PHANPY_WEBSITE="https://dev.phanpy.social" env PHANPY_DEFAULT_INSTANCE=hachyderm.io env PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL=https://hachyderm.io/auth/sign_up env PHANPY_PRIVACY_POLICY_URL=https://hachyderm.io/privacy-policy npm run build
1 Like
jakfrost
(Stephen Douglas Snow)
June 23, 2024, 10:56am
4
tealk
(Tealk)
June 23, 2024, 11:02am
5
I don’t understand the linked article right now.
I’m just thinking whether it’s possible to store variables in the container?
jakfrost
(Stephen Douglas Snow)
June 23, 2024, 11:04am
6
I didn’t read it, just skimmed, but I thought it was related to your desire to run node in a toolbox container.