From 2188af0b78b9b07fe5f44d7bcb990bd795d351e5 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 12 Jun 2023 21:45:23 -0400 Subject: [PATCH] successfully automated tagged+versioned docker image builds and pushes --- Dockerfile | 3 +-- Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd9b12e..193c4af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ FROM golang:latest AS builder ADD . /opt/obp WORKDIR /opt/obp -# RUN go build -o baas cmd/main.go RUN make build-alpine FROM alpine:latest RUN apk --no-cache add ca-certificates ARG VERSION=* -COPY --from=builder /opt/obp/dist/obp-$VERSION-alpine_amda64/obp /bin/obp +COPY --from=builder /opt/obp/dist/obp-$VERSION-alpine_amd64/obp /bin/obp RUN chmod +x /bin/obp diff --git a/Makefile b/Makefile index a07be1e..ef82756 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ docker: docker-image docker-push .PHONY: docker-push docker-push: - $(DOCKER_CMD) pull code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION) $(DOCKER_CMD) tag code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION) code.ndumas.com/ndumas/obsidian-pipeline:latest $(DOCKER_CMD) push code.ndumas.com/ndumas/obsidian-pipeline:latest + $(DOCKER_CMD) push code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION) .PHONY: docker-image docker-image: