forked from ojo-network/price-feeder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (28 loc) · 1.11 KB
/
Dockerfile
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
37
38
# Builder
FROM golang:1.21-alpine AS builder
RUN apk add --no-cache \
ca-certificates \
build-base \
linux-headers \
git
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# Cosmwasm - Download correct libwasmvm version
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | cut -d ' ' -f 2) && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$(uname -m).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 $(uname -m).a | cut -d ' ' -f 1)
COPY . .
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
# Runner
FROM alpine
RUN apk add bash
WORKDIR /app
COPY --from=builder /app/build/price-feeder /bin/price-feeder
COPY --from=builder /app/price-feeder.example.toml /app/price-feeder.toml
COPY --from=builder /app/umee-provider-config/ /app/umee-provider-config/
EXPOSE 7171
ENTRYPOINT ["price-feeder", "price-feeder.toml"]