Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
maiquanghiep committed Sep 4, 2024
1 parent 6963f25 commit 86e79f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## Image for building
FROM golang:1.23-alpine AS build-env
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build-env


# TARGETPLATFORM should be one of linux/amd64 or linux/arm64.
ARG TARGETPLATFORM="linux/amd64"
ARG TARGETOS TARGETARCH
# Version to build. Default is empty.
ARG VERSION

Expand All @@ -26,6 +25,8 @@ RUN if [ -n "${VERSION}" ]; then \
git checkout -f ${VERSION}; \
fi

RUN echo $BUILDPLATFORM
RUN uname -m
# Cosmwasm - Download correct libwasmvm version
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | cut -d ' ' -f 2) && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$(uname -m).a \
Expand All @@ -38,6 +39,8 @@ RUN CGO_LDFLAGS="$CGO_LDFLAGS -lstdc++ -lm -lsodium" \
CGO_ENABLED=1 \
BUILD_TAGS=$BUILD_TAGS \
LINK_STATICALLY=true \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
make build

FROM alpine:3.16 AS run
Expand Down

0 comments on commit 86e79f8

Please sign in to comment.