mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
add make targets to build and push corrosion image
This commit is contained in:
@@ -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 --from=corrosion-image-tarball /corrosion.tar /images/corrosion.tar
|
||||||
COPY scripts/docker/dind scripts/docker/entrypoint.sh /usr/local/bin/
|
COPY scripts/docker/dind scripts/docker/entrypoint.sh /usr/local/bin/
|
||||||
COPY --from=uncloudd /build/uncloudd /usr/local/bin/
|
COPY --from=uncloudd /build/uncloudd /usr/local/bin/
|
||||||
# TODO: socat to forward uncloud.sock unix socket?
|
|
||||||
|
|
||||||
ENTRYPOINT ["entrypoint.sh"]
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
CMD ["uncloudd"]
|
CMD ["uncloudd"]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.PHONY: build
|
CORROSION_IMAGE ?= ghcr.io/psviderski/corrosion:latest
|
||||||
|
|
||||||
update-dev:
|
update-dev:
|
||||||
GOOS=linux GOARCH=amd64 go build -o uncloudd-linux-amd64 ./cmd/uncloudd && \
|
GOOS=linux GOARCH=amd64 go build -o uncloudd-linux-amd64 ./cmd/uncloudd && \
|
||||||
scp uncloudd-linux-amd64 spy@192.168.40.243:~/ && \
|
scp uncloudd-linux-amd64 spy@192.168.40.243:~/ && \
|
||||||
@@ -24,3 +25,11 @@ reset-dev:
|
|||||||
proto:
|
proto:
|
||||||
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative \
|
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
|
--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)"
|
||||||
|
|||||||
Reference in New Issue
Block a user