-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker] Add script for mirroring dockerhub images
- Loading branch information
1 parent
3f31b55
commit 784edd8
Showing
13 changed files
with
91 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if command -v skopeo | ||
then | ||
copy_image() { | ||
skopeo copy --override-os linux --override-arch amd64 docker://docker.io/$1 docker://$2 | ||
} | ||
else | ||
echo Could not find skopeo, falling back to docker which will be slower. | ||
copy_image() { | ||
docker pull $1 | ||
docker tag $1 $2 | ||
docker push $2 | ||
} | ||
fi |
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,11 @@ | ||
include ../../config.mk | ||
|
||
.PHONY: publish-python-dill | ||
|
||
publish-python-dill: | ||
DOCKER_PREFIX=$(DOCKER_PREFIX) bash python-dill/push.sh | ||
|
||
mirror-dockerhub-images: | ||
DOCKER_PREFIX=$(DOCKER_PREFIX) \ | ||
HAIL_PIP_VERSION=$(shell cat ../../hail/python/hail/hail_pip_version) \ | ||
./mirror_images.sh |
File renamed without changes.
File renamed without changes.
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,42 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
source ../copy_image.sh | ||
|
||
if [[ -z "${DOCKER_PREFIX}" ]]; | ||
then | ||
echo "Env variable DOCKER_PREFIX must be set" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${HAIL_PIP_VERSION}" ]]; | ||
then | ||
echo "Env variable HAIL_PIP_VERSION must be set" | ||
exit 1 | ||
fi | ||
|
||
python_dill_images=( | ||
"python-dill:3.7" | ||
"python-dill:3.7-slim" | ||
"python-dill:3.8" | ||
"python-dill:3.8-slim" | ||
"python-dill:3.9" | ||
"python-dill:3.9-slim" | ||
"python-dill:3.10" | ||
"python-dill:3.10-slim" | ||
) | ||
|
||
for image in "${python_dill_images[@]}" | ||
do | ||
copy_image "hailgenetics/${image}" "${DOCKER_PREFIX}/hailgenetics/${image}" | ||
done | ||
|
||
pip_release_images=( | ||
"hail:${HAIL_PIP_VERSION}" | ||
"genetics:${HAIL_PIP_VERSION}" | ||
) | ||
for image in "${pip_release_images[@]}" | ||
do | ||
copy_image "hailgenetics/${image}" "${DOCKER_PREFIX}/hailgenetics/${image}" | ||
done |
3 changes: 2 additions & 1 deletion
3
docker/python-dill/Dockerfile → docker/hailgenetics/python-dill/Dockerfile
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,17 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
for version in 3.7 3.7-slim 3.8 3.8-slim 3.9 3.9-slim 3.10 3.10-slim | ||
do | ||
public=hailgenetics/python-dill:$version | ||
|
||
DOCKER_BUILDKIT=1 docker build \ | ||
--build-arg PYTHON_VERSION=$version \ | ||
--file Dockerfile.out \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--tag ${public} \ | ||
. | ||
|
||
time DOCKER_BUILDKIT=1 docker push ${public} | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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