-
Notifications
You must be signed in to change notification settings - Fork 61
/
Dockerfile.osmosis
37 lines (26 loc) · 1.26 KB
/
Dockerfile.osmosis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## --------------------------------------------------------
# Build
# --------------------------------------------------------
FROM golang:1.21.8-alpine3.18 as build
RUN set -eux; apk add --no-cache ca-certificates build-base;
RUN apk add git
# Needed by github.com/zondax/hid
RUN apk add linux-headers
RUN git clone https://github.com/osmosis-labs/osmosis /osmosis --branch v23.0.0-rc1
WORKDIR /osmosis
RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | sed 's/.* //') && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$ARCH.a \
-O /lib/libwasmvm_muslc.a && \
# verify checksum
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \
sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$ARCH | cut -d ' ' -f 1)
RUN BUILD_TAGS=muslc LINK_STATICALLY=true make build
# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM alpine:3.18
RUN apk add --no-cache bash ca-certificates jq
COPY --from=build /osmosis/build/osmosisd /bin/osmosisd
RUN adduser -S -h /osmosis -D osmosis -u 1000
WORKDIR /osmosis
USER osmosis