forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: fix build environment for the liveness test (backport cosmos#1…
…0551) (cosmos#10552) * build: fix build environment for the liveness test (cosmos#10551) Extracted from cosmos#10210. Make the test more reproducible, so that it does not require coordination between the build container and the run container. - Use layers to more advantage. - Include bash in the run container. - Put writable output onto a volume. (cherry picked from commit 70a3a90) # Conflicts: # Makefile * fix conflict Co-authored-by: M. J. Fromberger <[email protected]> Co-authored-by: Robert Zaremba <[email protected]>
- Loading branch information
1 parent
9360903
commit 0742e86
Showing
5 changed files
with
18 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,21 @@ | ||
FROM golang:1.23-alpine AS build | ||
|
||
FROM golang:1.17-alpine AS build | ||
RUN apk add build-base git linux-headers | ||
|
||
WORKDIR /work | ||
COPY go.mod go.sum /work/ | ||
COPY math/go.mod math/go.sum /work/math/ | ||
COPY api/go.mod api/go.sum /work/api/ | ||
COPY log/go.mod log/go.sum /work/log/ | ||
COPY core/go.mod core/go.sum /work/core/ | ||
COPY collections/go.mod collections/go.sum /work/collections/ | ||
COPY store/go.mod store/go.sum /work/store/ | ||
COPY depinject/go.mod depinject/go.sum /work/depinject/ | ||
COPY x/tx/go.mod x/tx/go.sum /work/x/tx/ | ||
COPY x/protocolpool/go.mod x/protocolpool/go.sum /work/x/protocolpool/ | ||
COPY x/gov/go.mod x/gov/go.sum /work/x/gov/ | ||
COPY x/distribution/go.mod x/distribution/go.sum /work/x/distribution/ | ||
COPY x/slashing/go.mod x/slashing/go.sum /work/x/slashing/ | ||
COPY x/staking/go.mod x/staking/go.sum /work/x/staking/ | ||
COPY x/auth/go.mod x/auth/go.sum /work/x/auth/ | ||
COPY x/authz/go.mod x/authz/go.sum /work/x/authz/ | ||
COPY x/bank/go.mod x/bank/go.sum /work/x/bank/ | ||
COPY x/mint/go.mod x/mint/go.sum /work/x/mint/ | ||
COPY x/consensus/go.mod x/consensus/go.sum /work/x/consensus/ | ||
COPY x/accounts/go.mod x/accounts/go.sum /work/x/accounts/ | ||
COPY runtime/v2/go.mod runtime/v2/go.sum /work/runtime/v2/ | ||
COPY server/v2/go.mod server/v2/go.sum /work/server/v2/ | ||
COPY server/v2/appmanager/go.mod server/v2/appmanager/go.sum /work/server/v2/appmanager/ | ||
COPY server/v2/stf/go.mod server/v2/stf/go.sum /work/server/v2/stf/ | ||
COPY server/v2/cometbft/go.mod server/v2/cometbft/go.sum /work/server/v2/cometbft/ | ||
COPY core/testing/go.mod core/testing/go.sum /work/core/testing/ | ||
|
||
COPY db/go.mod db/go.sum /work/db/ | ||
RUN go mod download | ||
|
||
COPY ./ /work | ||
RUN LEDGER_ENABLED=false make clean build | ||
|
||
|
||
FROM alpine AS run | ||
FROM alpine:3.14 AS run | ||
RUN apk add bash curl jq | ||
COPY contrib/images/simd-env/wrapper.sh /usr/bin/wrapper.sh | ||
|
||
VOLUME /simd | ||
COPY --from=build /work/build/simd /simd/ | ||
WORKDIR /simd | ||
|
||
EXPOSE 26656 26657 | ||
ENTRYPOINT ["/usr/bin/wrapper.sh"] | ||
CMD ["start", "--log_format", "plain"] | ||
STOPSIGNAL SIGTERM | ||
VOLUME /simd | ||
WORKDIR /simd | ||
|
||
COPY contrib/images/simd-env/wrapper.sh /usr/bin/wrapper.sh | ||
COPY --from=build /work/build/simd /simd/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters