mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
da8a4f8787
* Bump to cosmos-sdk to v0.47.10-kava.2
* Update go version in dockerfile to 1.21
* Fix shard logic for iavl v1
* Update changelog
(cherry picked from commit 969614d555
)
Co-authored-by: Draco <draco@dracoli.com>
38 lines
987 B
Docker
38 lines
987 B
Docker
FROM golang:1.21-alpine AS build-env
|
|
|
|
# Set up dependencies
|
|
# bash, jq, curl for debugging
|
|
# git, make for installation
|
|
# libc-dev, gcc, linux-headers, eudev-dev are used for cgo and ledger installation
|
|
RUN apk add bash git make libc-dev gcc linux-headers eudev-dev jq curl
|
|
|
|
# Set working directory for the build
|
|
WORKDIR /root/kava
|
|
# default home directory is /root
|
|
|
|
# Copy dependency files first to facilitate dependency caching
|
|
COPY ./go.mod ./
|
|
COPY ./go.sum ./
|
|
|
|
# Download dependencies
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
go version && go mod download
|
|
|
|
# Add source files
|
|
COPY . .
|
|
|
|
#ENV LEDGER_ENABLED False
|
|
|
|
# Mount go build and mod caches as container caches, persisted between builder invocations
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
make install
|
|
|
|
FROM alpine:3.15
|
|
|
|
RUN apk add bash jq curl
|
|
COPY --from=build-env /go/bin/kava /bin/kava
|
|
|
|
CMD ["kava"]
|