I have a docker-compose-custom.yml file like this:
version: '3.8' services: myapp-back-preproduction: build: context: . container_name: myapp-back-preproduction image: 'myapp-back-preproduction:latest' ....
I want to execute a simple command within the container after this one started to run using
docker-compose -p myapp-back-preproduction -f docker-compose-custom.yml exec npm install
npm install to be executed within the container.
But it displays nothing in the console, it simply returns.
docker exec instead works but it logically lacks all environment variables declared in my
docker-compose-custom.yml file; I want to use
docker-compose version is: 1.29.2
How to make it work?