Skip to content

Instantly share code, notes, and snippets.

@rpoisel
Last active October 24, 2022 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpoisel/c32033705b2aa8747d1ca5f5442a559a to your computer and use it in GitHub Desktop.
Save rpoisel/c32033705b2aa8747d1ca5f5442a559a to your computer and use it in GitHub Desktop.
Sharing Variables between GNU Make and the Bash
file=$(cat env)
for line in $file; do
export "${line}"
done
---
version: '3'
services:
nginx:
image: nginx:1.16.0-alpine
ports:
- "8080:80"
COMPOSE_FILE=docker-compose.myproject.yaml
DOCKER_CONTEXT=default
COMPOSE_PROJECT_NAME=myproject
include env
export
all:
@echo $(COMPOSE_FILE)
up:
docker compose up -d
down:
docker compose down -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment