-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Push directly to a local registry
This is a stepping stone to push directly to another registry in the CI workflow, while maintaining ease of local development. Reasons to push directly: 1. Allows breaking up the CI workflow by persisting the built images 2. Allows multi-platform images to be published This breaks the CI workflow since the unchanged push mechanisms rely on tags being available locally. That will be fixed in a following commit.
- Loading branch information
Showing
5 changed files
with
74 additions
and
17 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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# | ||
# Starts a Docker registry on localhost using a Docker container. | ||
# | ||
set -euo pipefail | ||
|
||
# Port to run the registry on. If not provided, default to 5000. | ||
PORT="${1:-5000}" | ||
|
||
# Name of the docker container. | ||
NAME=nextstrain-local-registry | ||
|
||
# Docker image that provides the registry service. | ||
IMAGE=registry:2 | ||
|
||
docker run -d -p "$PORT":"$PORT" --restart always --name "$NAME" "$IMAGE" > /dev/null |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# | ||
# Stops a local Docker registry created by start-localhost-registry. | ||
# | ||
set -euo pipefail | ||
|
||
NAME=nextstrain-local-registry | ||
|
||
docker stop "$NAME" > /dev/null | ||
docker rm "$NAME" > /dev/null |