+ docker compose config
WARN[0000] The "SHARED" variable is not set. Defaulting to a blank string.
name: tmp
services:
test:
environment:
SHARED: xyz
image: bash
networks:
default: null
volumes:
- type: bind
source: /tmp
target: /shared
networks:
default:
name: tmp_default
WARN[0000] The “SHARED” variable is not set. Defaulting to a blank string.
Why?
Here’s some info
+ lsb_release -a
Description: Ubuntu 22.04.4 LTS
+ docker compose version
Docker Compose version v2.29.0
+ cat docker-compose.yml
services:
test:
image: bash
env_file:
- path: shared.env
required: true
volumes:
- type: bind
source: $SHARED
target: /shared
+ cat shared.env
SHARED=xyz