Created
October 28, 2023 23:14
-
-
Save fabidick22/3e65abafce998fef48ac8c2cfa8a5ae1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export AWS_REGION=us-east-1 | |
export REGISTRY_USER=AWS | |
export REGISTRY_PASSWORD=$(aws ecr get-login-password --region $AWS_REGION) | |
export REGISTRY=000000000000.dkr.ecr.$AWS_REGION.amazonaws.com | |
# needed the SOCI snapshotter which runs as root | |
echo $REGISTRY_PASSWORD | sudo nerdctl login -u $REGISTRY_USER --password-stdin $REGISTRY | |
# Pull and push image | |
sudo nerdctl pull docker.io/library/rabbitmq:latest | |
sudo nerdctl image tag docker.io/library/rabbitmq:latest $REGISTRY/soci-repo-test:latest | |
sudo nerdctl push --platform linux/amd64 $REGISTRY/soci-repo-test:latest | |
# Create SOCI index | |
sudo soci create $REGISTRY/soci-repo-test:latest | |
sudo soci push --user $REGISTRY_USER:$REGISTRY_PASSWORD $REGISTRY/soci-repo-test:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment