Open oberstet opened 2 years ago
So say you have 2 env files
.env
myapp.env
Then you can use a docker-compose.yml
like
myapp:
container_name: myapp
image: ${DOCKER_IMAGE_AUTOBAHN_PYTHON}
env_file:
- myapp.env
user: ${UID}:${GID}
tty: true
volumes:
- "/home/ubuntu/myapp/:/app:rw"
command:
- python
- myapp.py
The crucial point is: DOCKER_IMAGE_AUTOBAHN_PYTHON
, UID
and GID
must be defined in .env
.
Stuff in myapp.env
is only available within myapp.py
!
After building and uploading new Docker images for Autobahn, it would be great to have the new Docker images listed in a way that allows exact reference and direct use in other projects
Docker CLI and docker-compose allows to read env vars from a
.env
file, that if present, will make env vars already available during "docker-compose" phase (not only inside containers)Above can be computed like this