0๐
โ
I figured it out how to do it:
In my package.json I have the following configuration
"test_build": "vue-cli-service build --mode test", "production": "vue-cli-service build --mode production", "development": "vue-cli-service build --mode development"
docker-compose file:
client_test:
args:
- myenv=development
docker file:
ARG myenv RUN npm run $myenv
When building the project the $myenv gets passed to the build in the package.json where it then switches to the different environment files.
Source:stackexchange.com