diff --git a/Dockerfile b/Dockerfile index 30211a24..6fe39aa3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,6 @@ 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/ COPY --from=uncloudd /build/uncloudd /usr/local/bin/ -# TODO: socat to forward uncloud.sock unix socket? ENTRYPOINT ["entrypoint.sh"] CMD ["uncloudd"] diff --git a/Makefile b/Makefile index a48e41a4..a262f488 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -.PHONY: build +CORROSION_IMAGE ?= ghcr.io/psviderski/corrosion:latest + update-dev: GOOS=linux GOARCH=amd64 go build -o uncloudd-linux-amd64 ./cmd/uncloudd && \ scp uncloudd-linux-amd64 spy@192.168.40.243:~/ && \ @@ -24,3 +25,11 @@ reset-dev: proto: protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative \ --proto_path=. --proto_path=internal/machine/api/vendor internal/machine/api/pb/*.proto + +.PHONY: corrosion-image +corrosion-image: + docker build -t "$(CORROSION_IMAGE)" --target corrosion . + +.PHONY: corrosion-image-push +corrosion-image-push: corrosion-image + docker push "$(CORROSION_IMAGE)"