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
#!/bin/bash | |
SATELLITE_URL=${1} | |
SATELLITE_PREFIX=${2} | |
IMAGESTREAM_FILE=${3} | |
oc get is -o yaml > ${IMAGESTREAM_FILE} | |
cat ${IMAGESTREAM_FILE} | grep "name: ${SATELLITE_URL}" | awk '{ print $2" "$2 }' > output.txt | |
sed -E -i "s|(.*)\s${SATELLITE_URL}/(.*)/(.*)|\1\|${SATELLITE_URL}/${SATELLITE_PREFIX}-\2_\3|g" output.txt | |
for elements in $(cat output.txt) |
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
# Variables to start the registry | |
RANGE_PORTS="5000:5000" | |
REGISTRY_STORAGE_VOLUME="/var/lib/registry:/var/lib/registry" | |
REGISTRY_CONTAINER_LABEL="registry" | |
REGISTRY_CONTAINER_NAME="registry:2" |
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
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: docker-registry | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts docker-registry | |
# chkconfig: - 80 15 | |
# Description: Docker-registry |
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
[Unit] | |
Description=Registry Docker Systemctl script | |
After=docker.service | |
[Service] | |
Type=forking | |
ExecStart=/etc/init.d/docker-registry-script start | |
ExecStop=/etc/init.d/docker-registry-script stop | |
ExecReload=/etc/init.d/docker-registry-script restart | |
PIDFile=/var/run/docker-registry/docker-registry.pid |
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
#!/bin/bash | |
REGISTRY=${1} | |
ORIGIN=${2} | |
INVENTORY=${3} | |
for images in $(cat ${INVENTORY}) ; do | |
echo "Inserting image ${images}" | |
skopeo copy dir:${ORIGIN}/${images} docker://${REGISTRY}/${images} | |
done |
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
#!/bin/bash | |
REGISTRY=docker://registry.access.redhat.com | |
DESTINY=./copy-images | |
for images in $(cat ${1} | grep -v ^#) ; do | |
echo "Copying image ${images}" | |
mkdir -p ${DESTINY}/${images} | |
skopeo copy --dest-compress ${REGISTRY}/${images} dir:${DESTINY}/${images} | |
done |
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
### Keybase proof | |
I hereby claim: | |
* I am miguel-nunes on github. | |
* I am miguelnunes (https://keybase.io/miguelnunes) on keybase. | |
* I have a public key ASBwizRDDv7f-AYdYAy4-0nSjGZXwg8ooSTIsZHFMBvf1go | |
To claim this, I am signing this object: |