From 24a824b8900384e3cdec287f32e019e4633f0c61 Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Wed, 27 Nov 2024 17:14:41 +1000 Subject: [PATCH] add make targets to build and push ucind image --- Dockerfile | 6 +++--- Makefile | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fe39aa3..3286fd60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,12 +35,12 @@ RUN apk --no-cache add crane RUN crane pull "${CORROSION_IMAGE}" /corrosion.tar -FROM docker:27.3.1-dind AS machine +FROM docker:27.3.1-dind AS ucind +# Create system group and user 'uncloud'. +RUN addgroup -S uncloud && adduser -SHD -h /nonexistent -G uncloud -g "" uncloud RUN apk --no-cache add \ socat \ wireguard-tools -# Create system group and user 'uncloud'. -RUN addgroup -S uncloud && adduser -SHD -h /nonexistent -G uncloud -g "" uncloud COPY --from=corrosion-image-tarball /corrosion.tar /images/corrosion.tar COPY scripts/docker/dind scripts/docker/entrypoint.sh /usr/local/bin/ diff --git a/Makefile b/Makefile index a262f488..01bb07c9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ CORROSION_IMAGE ?= ghcr.io/psviderski/corrosion:latest +UCIND_IMAGE ?= ghcr.io/psviderski/ucind:latest update-dev: GOOS=linux GOARCH=amd64 go build -o uncloudd-linux-amd64 ./cmd/uncloudd && \ @@ -33,3 +34,11 @@ corrosion-image: .PHONY: corrosion-image-push corrosion-image-push: corrosion-image docker push "$(CORROSION_IMAGE)" + +.PHONY: ucind-image +ucind-image: + docker build -t "$(UCIND_IMAGE)" --target ucind . + +.PHONY: ucind-image-push +ucind-image-push: ucind-image + docker push "$(UCIND_IMAGE)"