Skip to content

Commit

Permalink
Don't use make in the Dockerfile (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Calebjh authored Nov 22, 2022
1 parent cea73ce commit 3510bf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM golang:1.19-alpine3.16 AS builder
ARG VERSION
ARG DATABASE
ARG SOURCE

RUN apk add --no-cache git gcc musl-dev make

Expand All @@ -13,7 +15,7 @@ RUN go mod download

COPY . ./

RUN make build-docker
RUN CGO_ENABLED=0 go build -a -o build/migrate.linux-386 -ldflags="-s -w -X main.Version=${VERSION}" -tags "$(DATABASE) $(SOURCE)" ./cmd/migrate

FROM alpine:3.16

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ build-cli: clean
cat ./cli/build/sha256sum.txt

build:
docker build --build-arg VERSION=$(VERSION) . -t infoblox/migrate -t infoblox/migrate:$(VERSION)
docker build --build-arg VERSION=$(VERSION) --build-arg DATABASE="$(DATABASE)" --build-arg SOURCE="$(SOURCE)" . -t infoblox/migrate -t infoblox/migrate:$(VERSION)

docker-push:
docker push infoblox/migrate:$(VERSION)
Expand Down

0 comments on commit 3510bf1

Please sign in to comment.