Skip to content

Commit

Permalink
Merge pull request #91 from InjectiveLabs/f/build-fix
Browse files Browse the repository at this point in the history
feat: add docker build flag
  • Loading branch information
nmarcetic authored Jul 6, 2023
2 parents 40bd518 + e462815 commit d189c5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY . .
RUN go mod download

#install binary
RUN make install
RUN DOCKER=true make install

#build main container
FROM alpine:latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.nonroot
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY . .
RUN go mod download

#install binary
RUN make install
RUN DOCKER=true make install

#build main container
FROM alpine:latest
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD)
BUILD_DATE = $(shell date -u "+%Y%m%d-%H%M")
VERSION_PKG = github.com/InjectiveLabs/peggo/orchestrator/version
IMAGE_NAME := gcr.io/injective-core/peggo
DOCKER ?= false

all:

Expand All @@ -18,9 +19,7 @@ push:
install: export GOPROXY=direct
install: export VERSION_FLAGS="-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) -X $(VERSION_PKG).BuildDate=$(BUILD_DATE)"
install:
go install \
-ldflags $(VERSION_FLAGS) \
./cmd/...
$(DOCKER) && go install -tags muslc -ldflags $(VERSION_FLAGS) ./cmd/... || go install -ldflags $(VERSION_FLAGS) ./cmd/...

.PHONY: install image push test gen

Expand Down

0 comments on commit d189c5c

Please sign in to comment.