From ef3c2c618273896f4112d516df9f2ae690d5e538 Mon Sep 17 00:00:00 2001 From: Nianyu Shen Date: Tue, 20 Aug 2024 22:48:12 -0700 Subject: [PATCH] use spectro alpine instead of offical one (#259) --- Earthfile | 2 +- earthly.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Earthfile b/Earthfile index cd349df..caa3355 100644 --- a/Earthfile +++ b/Earthfile @@ -3,8 +3,8 @@ ARG TARGETOS ARG TARGETARCH # Default image repositories used in the builds. -ARG ALPINE_IMG=gcr.io/spectro-images-public/alpine:3.20.2 ARG SPECTRO_PUB_REPO=gcr.io/spectro-images-public +ARG ALPINE_IMG=$SPECTRO_PUB_REPO/alpine:3.20.2 ARG SPECTRO_LUET_REPO=gcr.io/spectro-dev-public ARG KAIROS_BASE_IMAGE_URL=gcr.io/spectro-images-public ARG ETCD_REPO=https://github.com/etcd-io diff --git a/earthly.sh b/earthly.sh index fcec591..ea0c323 100755 --- a/earthly.sh +++ b/earthly.sh @@ -61,7 +61,7 @@ PE_VERSION=$(git describe --abbrev=0 --tags) SPECTRO_PUB_REPO=gcr.io/spectro-images-public EARTHLY_VERSION=v0.8.5 source .arg - +ALPINE_IMG=$SPECTRO_PUB_REPO/alpine:3.20.2 ### Verify Depencies # Check if Docker is installed if command -v docker >/dev/null 2>&1; then @@ -70,7 +70,7 @@ else echo "Docker not found. Please use the guide for your platform located https://docs.docker.com/engine/install/ to install Docker." fi # Check if the current user has permission to run privileged containers -if ! docker run --rm --privileged alpine sh -c 'echo "Privileged container test"' &>/dev/null; then +if ! docker run --rm --privileged $ALPINE_IMG sh -c 'echo "Privileged container test"' &>/dev/null; then echo "Privileged containers are not allowed for the current user." exit 1 fi @@ -91,7 +91,7 @@ if [ "$(docker container inspect -f '{{.State.Running}}' earthly-buildkitd)" = " docker stop earthly-buildkitd fi docker rmi $SPECTRO_PUB_REPO/earthly/buildkitd:$EARTHLY_VERSION 2>/dev/null -docker rmi alpine:latest +docker rmi $ALPINE_IMG if [[ "$1" == "+uki-genkey" ]]; then ./keys.sh secure-boot/