1 year ago

#380791

test-img

Ludek Vodicka

Is there any way how to load environemnt variable from remote docker machine and not the local?

We have docker machine created via:

docker-machine create --driver generic --generic-ip-address=....

when restarting containers from this machine, we're doing that from our local development machines via:

SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://....
SET DOCKER_CERT_PATH=...
SET DOCKER_MACHINE_NAME=....
SET COMPOSE_CONVERT_WINDOWS_PATHS=true

now, we have environment variables configured in docker-compose

   environment:
      - SRV_VARIABLE=${SRV_VARIABLE}

but when we restart the server from our local system, docker-compose use SRV_VARIABLE located on our local computers and environment variable from the docker machine.

Is there any way, how to tell docker to use variable from the server and not from the local computer?

Thanks

docker

docker-compose

docker-machine

0 Answers

Your Answer

Accepted video resources