Skip to content

Instantly share code, notes, and snippets.

@DerekChia
Created December 26, 2021 10:51
Show Gist options
  • Save DerekChia/6bb80f42b7849c028e52594a3565dfa0 to your computer and use it in GitHub Desktop.
Save DerekChia/6bb80f42b7849c028e52594a3565dfa0 to your computer and use it in GitHub Desktop.
Start a container, read and print the environment variable passed in via "environment:"
version: "3"
services:
hello_world:
container_name: ubuntu
image: ubuntu:latest
environment:
VARIABLE_ONE: ONE
command: '/bin/sh -c "echo $$VARIABLE_ONE"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment