-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# Exclude the project virtual environment from image builds | ||
.venv |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Build and run the example Docker image. | ||
# | ||
# Mounts the local project directory to reflect a common development workflow. | ||
|
||
docker run --rm --volume .:/app --volume /app/.venv -it $(docker build -q .) $@ | ||
|
||
docker run \ | ||
--rm \ # Remove the container after exiting | ||
--volume .:/app \ # Mount the current directory to `/app` so code changes don't require an image rebuild | ||
--volume /app/.venv \ # Mount the virtual environment separately, so the developer's environment doesn't end up in the container | ||
-it $(docker build -q .) \ # Build the image, then use it as a run target | ||
$@ # Pass any arguments to the container |