I'm trying to get the variable from the command line using:
sudo docker-compose -f docker-compose-fooname.yml run -e BLABLA=hello someservicename
My file looks like this:
version: '3'
services:
someservicename:
environment:
- BLABLA
image: docker.websitename.com/image-name:latest
volumes:
- /var/www/image-name
command: ["npm", "run", BLABLA]
All of this is so that I can run a script defined by what I use as BLABLA in the command line, I've tried going with official documentation.
Tried several options including:
sudo COMPOSE_OPTIONS="-e BLABLA=hello" docker-compose -f docker-compose-fooname.yml run someservicename
UPDATE: I have to mention that as it is, I always get:
WARNING: The FAKE_SERVER_MODE variable is not set. Defaulting to a blank string.
Even when I just run the following command (be it remove, stop..):
sudo docker-compose -f docker-compose-fooname.yml stop someservicename
For the record: I'm pulling the image first, I never build it but my CI/CD tool does (gitlab), does this affect it?
I'm using docker-compose version 1.18, docker version 18.06.1-ce, Ubuntu 16.04