Skip to content

Commit

Permalink
Remoe docker caching logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbaker1 committed Oct 15, 2024
1 parent 8c81be9 commit bc7717a
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions templates/al2/provisioners/cache-pause-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ set -o pipefail
AWS_DOMAIN=$(imds 'latest/meta-data/services/domain')
ECR_URI="$(/etc/eks/get-ecr-uri.sh ${AWS_REGION} ${AWS_DOMAIN})"

PAUSE_CONTAINER_IMAGE="${ECR_URI}/eks/pause:3.5"

sudo systemctl start containerd
cache-pause-container -i ${PAUSE_CONTAINER_IMAGE}
cache-pause-container -i "${ECR_URI}/eks/pause:3.5"
sudo systemctl stop containerd

# we also need to import the image into docker, which is still default on 1.23
# and supportted below 1.25.
# NOTE: there was some difficulty importing the same image exported by ctr, so
# this part follows separately
if vercmp ${KUBERNETES_VERSION} lt "1.25"; then
sudo systemctl start docker
aws ecr get-login-password | sudo docker login --username AWS --password-stdin ${ECR_URI}
sudo docker pull ${PAUSE_CONTAINER_IMAGE}
sudo docker image tag ${PAUSE_CONTAINER_IMAGE} "localhost/kubernetes/pause:0.1.0"
sudo systemctl stop docker
fi

0 comments on commit bc7717a

Please sign in to comment.