generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 127
/
Dockerfile
27 lines (18 loc) · 967 Bytes
/
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
#--- Build stage
FROM golang:1.23-alpine3.20 AS go-builder
WORKDIR /src
# CosmWasm: see https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
# hadolint ignore=DL4006
RUN set -eux \
&& apk add --no-cache ca-certificates=20240705-r0 build-base=0.5-r3 git=~2.45 linux-headers=6.6-r0 \
&& sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 0881c5b463e89e229b06370e9e2961aec0a5c636772d5142c68d351564464a66 \
&& sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 58e1f6bfa89ee390cb9abc69a5bc126029a497fe09dd399f38a82d0d86fe95ef
COPY . /src/
RUN BUILD_TAGS=muslc LINK_STATICALLY=true make build
#--- Image stage
FROM alpine:3.20.3
COPY --from=go-builder /src/target/dist/axoned /usr/bin/axoned
WORKDIR /opt
ENTRYPOINT ["axoned"]