Created
February 13, 2023 15:45
-
-
Save alanplatt/93db87434fd6c83aea9e363d1f46d3fe to your computer and use it in GitHub Desktop.
Run commands from a container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mount the current directory as the working directory in the contianer (great for linting etc) | |
alias docker-run='docker run -it --workdir ${PWD} -v ${PWD}:${PWD}' | |
# Generate a Dockerfile from an image | |
alias dfimage="docker-run -v /var/run/docker.sock:/var/run/docker.sock --rm alpine/dfimage" | |
# Python linting | |
alias flake8="docker-run python:3-alpine flake8" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment