Skip to content

Instantly share code, notes, and snippets.

@Ravenstine
Created December 4, 2023 12:37
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 Ravenstine/91ecd34f1bc012571eb6afbda63181b4 to your computer and use it in GitHub Desktop.
Save Ravenstine/91ecd34f1bc012571eb6afbda63181b4 to your computer and use it in GitHub Desktop.
Shebang To Run Script In Docker Container

Shebang To Run Script In Docker Container

Docker

#!/usr/bin/env docker run --rm alpine:3.18.3 /bin/sh

echo "OS: $(uname -s)"

Docker Compose

#!/usr/bin/env docker compose run --rm my_service /bin/sh

echo "OS: $(uname -s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment