diff --git a/Dockerfile b/Dockerfile index faa52a5039..f3de4a83e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM golang:1.21.4-alpine3.18 AS build-env +FROM golang:1.22.5-alpine3.20 AS build-env ARG DB_BACKEND=goleveldb -ARG ROCKSDB_VERSION="8.5.3" +ARG ROCKSDB_VERSION="9.2.1" WORKDIR /go/src/github.com/evmos/evmos COPY go.mod go.sum ./ -RUN set -eux; apk add --no-cache ca-certificates=20240226-r0 build-base=0.5-r3 git=2.40.1-r0 linux-headers=6.3-r0 bash=5.2.15-r5 +RUN set -eux; apk add --no-cache ca-certificates=20240226-r0 build-base=0.5-r3 git=2.45.2-r0 linux-headers=6.6-r0 bash=5.2.26-r0 RUN --mount=type=bind,target=. --mount=type=secret,id=GITHUB_TOKEN \ git config --global url."https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/".insteadOf "https://github.com/"; \ @@ -17,21 +17,19 @@ COPY . . RUN mkdir -p /target/usr/lib /target/usr/local/lib /target/usr/include -RUN if [ "$DB_BACKEND" = "pebbledb" ]; then \ - make build-pebbledb; \ -elif [ "$DB_BACKEND" = "rocksdb" ]; then \ +RUN if [ "$DB_BACKEND" = "rocksdb" ]; then \ make build-rocksdb; \ cp -r /usr/lib/* /target/usr/lib/ && \ cp -r /usr/local/lib/* /target/usr/local/lib/ && \ cp -r /usr/include/* /target/usr/include/; \ else \ - # Build default binary (LevelDB) - make build; \ + # Build default binary with corresponding db backend + COSMOS_BUILD_OPTIONS=$DB_BACKEND make build; \ fi RUN go install github.com/MinseokOh/toml-cli@latest -FROM alpine:3.18 +FROM alpine:3.20 WORKDIR /root @@ -43,7 +41,7 @@ COPY --from=build-env /target/usr/lib /usr/lib COPY --from=build-env /target/usr/local/lib /usr/local/lib COPY --from=build-env /target/usr/include /usr/include -RUN apk add --no-cache ca-certificates=20240226-r0 jq=1.6-r4 curl=8.5.0-r0 bash=5.2.15-r5 vim=9.0.2073-r0 lz4=1.9.4-r4 rclone=1.62.2-r6 \ +RUN apk add --no-cache ca-certificates=20240705-r0 jq=1.7.1-r0 curl=8.8.0-r0 bash=5.2.26-r0 vim=9.1.0414-r0 lz4=1.9.4-r5 rclone=1.66.0-r4 \ && addgroup -g 1000 evmos \ && adduser -S -h /home/evmos -D evmos -u 1000 -G evmos @@ -51,5 +49,6 @@ USER 1000 WORKDIR /home/evmos EXPOSE 26656 26657 1317 9090 8545 8546 +HEALTHCHECK CMD curl --fail http://localhost:26657 || exit 1 CMD ["evmosd"] diff --git a/go.mod b/go.mod index bad4809588..adc49385c1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/evmos/evmos/v18 -go 1.22 +go 1.22.2 require ( cosmossdk.io/api v0.3.1