Files
osmosis-labs-osmosis/Dockerfile
PaddyMc 930687b72b chore: upgrade wasmd to v0.53.0 and wasmvm to v2.1.2 (#8616)
* chore: update wasmd to version v0.52.0

* chore: updating go mods

* chore: update stargate whitelist

* chore: update ibc-wasm

* chore: update changelog.md

* fix: avoid locks on wasm from temp app

* fix: tests that need to instantiate the wasm lock twice

* fix: non-module tests that need to instantiate the wasm lock twice

* fix: upgrade tests that need to instantiate the wasm lock twice

* fix: go list wasmvm v2 for deps

* fix: nil pointer as setup calling in wrong place

* fix: bump wasmd to v0.53.0

* fix: e2e by updating dockerfiles

* fix: e2e still panics on lock

* chore: update changelog

* Update x/txfees/keeper/hooks_test.go

Co-authored-by: Roman <roman@osmosis.team>

* Update x/txfees/keeper/hooks_test.go

Co-authored-by: Roman <roman@osmosis.team>

---------

Co-authored-by: Roman <roman@osmosis.team>
2024-08-22 09:14:20 +01:00

79 lines
2.5 KiB
Docker

# syntax=docker/dockerfile:1
# Please, when adding/editing this Dockerfile also take care of Dockerfile.cosmovisor as well
ARG GO_VERSION="1.22"
ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11"
ARG BUILD_TAGS="netgo,ledger,muslc"
# --------------------------------------------------------
# Builder
# --------------------------------------------------------
FROM golang:${GO_VERSION}-alpine3.20 as builder
ARG GIT_VERSION
ARG GIT_COMMIT
ARG BUILD_TAGS
RUN apk add --no-cache \
ca-certificates \
build-base \
linux-headers \
binutils-gold
# Download go dependencies
WORKDIR /osmosis
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg/mod \
go mod download
# Cosmwasm - Download correct libwasmvm version
RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | sed 's/.* //') && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$ARCH.a \
-O /lib/libwasmvm_muslc.$ARCH.a && \
# verify checksum
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \
sha256sum /lib/libwasmvm_muslc.$ARCH.a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$ARCH | cut -d ' ' -f 1)
# Copy the remaining files
COPY . .
# Build osmosisd binary
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg/mod \
GOWORK=off go build \
-mod=readonly \
-tags "netgo,ledger,muslc" \
-ldflags \
"-X github.com/cosmos/cosmos-sdk/version.Name="osmosis" \
-X github.com/cosmos/cosmos-sdk/version.AppName="osmosisd" \
-X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \
-X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=${BUILD_TAGS} \
-w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \
-trimpath \
-o /osmosis/build/osmosisd \
/osmosis/cmd/osmosisd/main.go
# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM ${RUNNER_IMAGE}
COPY --from=builder /osmosis/build/osmosisd /bin/osmosisd
ENV HOME=/osmosis
WORKDIR $HOME
EXPOSE 26656
EXPOSE 26657
EXPOSE 1317
# Note: uncomment the line below if you need pprof in localosmosis
# We disable it by default in out main Dockerfile for security reasons
# EXPOSE 6060
ENTRYPOINT ["osmosisd"]