Skip to content

Instantly share code, notes, and snippets.

@dromer
Created October 14, 2025 09:40
Show Gist options
  • Save dromer/f9fe78651ab14e86aa08cb51e7233abc to your computer and use it in GitHub Desktop.
Save dromer/f9fe78651ab14e86aa08cb51e7233abc to your computer and use it in GitHub Desktop.
VARIABLE="something"
services:
script:
build: .
env_file: ".env"
FROM python:3.13-slim
WORKDIR /app
COPY . .
CMD [ "python", "script.py" ]
import os
print(os.environ["VARIABLE"])
@dromer
Copy link
Author

dromer commented Oct 14, 2025

docker compose up

Attaching to script-1
script-1  | something
script-1 exited with code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment