11# syntax=docker/dockerfile:1
22
3- ARG GO_VERSION="1.21"
3+ # Please, when adding/editing this Dockerfile also take care of Dockerfile.cosmovisor as well
4+
5+ ARG GO_VERSION="1.23"
46ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11"
57ARG BUILD_TAGS="netgo,ledger,muslc"
68
79# --------------------------------------------------------
810# Builder
911# --------------------------------------------------------
1012
11- FROM golang:${GO_VERSION}-alpine3.18 as builder
13+ FROM golang:${GO_VERSION}-alpine3.20 as builder
1214
1315ARG GIT_VERSION
1416ARG GIT_COMMIT
@@ -17,7 +19,8 @@ ARG BUILD_TAGS
1719RUN apk add --no-cache \
1820 ca-certificates \
1921 build-base \
20- linux-headers
22+ linux-headers \
23+ binutils-gold
2124
2225# Download go dependencies
2326WORKDIR /osmosis
@@ -27,12 +30,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
2730 go mod download
2831
2932# Cosmwasm - Download correct libwasmvm version
30- RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | sed 's/.* //' ) && \
33+ RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | sed 's/.* //' ) && \
3134 wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$ARCH.a \
32- -O /lib/libwasmvm_muslc.a && \
35+ -O /lib/libwasmvm_muslc.$ARCH. a && \
3336 # verify checksum
3437 wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \
35- sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$ARCH | cut -d ' ' -f 1)
38+ sha256sum /lib/libwasmvm_muslc.$ARCH. a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$ARCH | cut -d ' ' -f 1)
3639
3740# Copy the remaining files
3841COPY . .
@@ -42,7 +45,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
4245 --mount=type=cache,target=/root/go/pkg/mod \
4346 GOWORK=off go build \
4447 -mod=readonly \
45- -tags ${BUILD_TAGS} \
48+ -tags "netgo,ledger,muslc" \
4649 -ldflags \
4750 "-X github.com/cosmos/cosmos-sdk/version.Name=" osmosis" \
4851 -X github.com/cosmos/cosmos-sdk/version.AppName=" osmosisd" \
@@ -62,7 +65,7 @@ FROM ${RUNNER_IMAGE}
6265
6366COPY --from=builder /osmosis/build/osmosisd /bin/osmosisd
6467
65- ENV HOME /osmosis
68+ ENV HOME= /osmosis
6669WORKDIR $HOME
6770
6871EXPOSE 26656
0 commit comments