Skip to content

Commit

Permalink
read machine architecture in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed Oct 9, 2023
1 parent e016fe3 commit 2743acc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ ENV GOARCH amd64

WORKDIR /app/cmd/backup
RUN go mod download
RUN CGO_CFLAGS="-I/app/modules/aerospike-tools-backup/modules/c-client/target/Linux-x86_64/include \

RUN export ARCH=`uname -m` && \
CGO_CFLAGS="-I/app/modules/aerospike-tools-backup/modules/c-client/target/Linux-$ARCH/include \
-I/app/modules/aerospike-tools-backup/include" CGO_ENABLED=1 go build -o backup .

FROM ubuntu:22.04
Expand Down

0 comments on commit 2743acc

Please sign in to comment.