Skip to content

Instantly share code, notes, and snippets.

@strobelt
Created May 18, 2022 03:14
Show Gist options
  • Save strobelt/058397300b240cf295d3c9d77d8d2ea3 to your computer and use it in GitHub Desktop.
Save strobelt/058397300b240cf295d3c9d77d8d2ea3 to your computer and use it in GitHub Desktop.
Set env var on Alpine Dockerfile
docker build -t charles . && docker run -it --rm charles /bin/sh
FROM alpine:latest
COPY startup.sh /startup.sh
ENTRYPOINT ["/startup.sh"]
#!/bin/sh
export CHARLES="Hello, Charles!"
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment