diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb671a4d..0f341d8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,7 +72,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./dockers/seda-node-static.Dockerfile + file: ./dockers/Dockerfile.node-static platforms: linux/amd64,linux/arm64 GO_VERSION: "1.21" RUNNER_IMAGE: "gcr.io/distroless/static-debian11:nonroot" diff --git a/Dockerfile b/Dockerfile index d4b54459..4231b9aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# This Dockerfile si for .gorelease purposesBuild: docker build -t seda-chaind . -# If you are looking for a Dockerfile to run a node, see dockers/seda-node.Dockerfile +# This Dockerfile is for .gorelease purposesBuild: docker build -t seda-chaind . +# If you are looking for a Dockerfile to run a node, see dockerfiles/Dockerfile.node FROM scratch ENTRYPOINT ["/seda-chaind"] COPY seda-chaind / diff --git a/Makefile b/Makefile index 0f0bb5e4..efea6fca 100644 --- a/Makefile +++ b/Makefile @@ -289,7 +289,7 @@ docker-static-build: --build-arg RUNNER_IMAGE=$(RUNNER_BASE_IMAGE_DISTROLESS) \ --build-arg GIT_VERSION=$(VERSION) \ --build-arg GIT_COMMIT=$(COMMIT) \ - -f static.Dockerfile . + -f $(CURDIR)/dockerfiles/Dockerfile.static . docker-static-build-alpine: @DOCKER_BUILDKIT=1 docker build \ @@ -298,4 +298,4 @@ docker-static-build-alpine: --build-arg RUNNER_IMAGE=$(RUNNER_BASE_IMAGE_ALPINE) \ --build-arg GIT_VERSION=$(VERSION) \ --build-arg GIT_COMMIT=$(COMMIT) \ - -f static.Dockerfile . + -f $(CURDIR)/dockerfiles/Dockerfile.static . diff --git a/dockers/goreleaser.Dockerfile b/dockerfiles/Dockerfile.goreleaser similarity index 100% rename from dockers/goreleaser.Dockerfile rename to dockerfiles/Dockerfile.goreleaser diff --git a/dockers/seda-node.Dockerfile b/dockerfiles/Dockerfile.node similarity index 100% rename from dockers/seda-node.Dockerfile rename to dockerfiles/Dockerfile.node diff --git a/dockers/seda-node-static.Dockerfile b/dockerfiles/Dockerfile.node-static similarity index 92% rename from dockers/seda-node-static.Dockerfile rename to dockerfiles/Dockerfile.node-static index 2ffe2f2e..6ac1502f 100644 --- a/dockers/seda-node-static.Dockerfile +++ b/dockerfiles/Dockerfile.node-static @@ -34,7 +34,7 @@ RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | # Copy the remaining files COPY . . -# Build osmosisd binary +# Build seda-chiand binary RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ GOWORK=off go build -v \ @@ -43,8 +43,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -ldflags \ "-X github.com/cosmos/cosmos-sdk/version.Name="seda-chain" \ -X github.com/cosmos/cosmos-sdk/version.AppName="seda-chaind" \ - -X github.com/cosmos/cosmos-sdk/version.Version="0.0.1" \ - -X github.com/cosmos/cosmos-sdk/version.Commit="00120312312" \ + -X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \ + -X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ @@ -69,8 +69,8 @@ WORKDIR $HOME EXPOSE 26656 EXPOSE 26657 EXPOSE 1317 +EXPOSE 9090 -# Binary for static image COPY --chown=nonroot:nonroot scripts/validator_setup/validator_setup.sh . RUN chmod +x validator_setup.sh ENTRYPOINT ["sh", "validator_setup.sh"] diff --git a/static.Dockerfile b/dockerfiles/Dockerfile.static similarity index 92% rename from static.Dockerfile rename to dockerfiles/Dockerfile.static index 471f3fe7..a89671d9 100644 --- a/static.Dockerfile +++ b/dockerfiles/Dockerfile.static @@ -63,11 +63,6 @@ COPY --from=builder /seda-chain/build/seda-chaind /bin/seda-chaind ENV HOME /seda-chain WORKDIR $HOME -EXPOSE 26656 -EXPOSE 26657 -EXPOSE 1317 -# Note: uncomment the line below if you need pprof -# We disable it by default in out main Dockerfile for security reasons -# EXPOSE 6060 +EXPOSE 26656 26657 1317 9090 ENTRYPOINT ["seda-chaind"]