Docker compose environment

direnv or your env?

Published: Thursday, May 20, 2021 Last modified: Saturday, Sep 18, 2021

export FOO=bar
echo FOO=hello > .env

Use a text editor and save this YAML to docker-compose.yml

version: '3'
services:
  test:
    image: busybox
    environment:
      FOO: ${FOO}
    command: echo $FOO

What do you think gets printed on docker-compose up?