cosmos-sdk/Dockerfile

43 lines
1.4 KiB
Docker
Raw Normal View History

2020-06-24 05:15:08 -07:00
# Simple usage with a mounted data directory:
# > docker build -t simapp .
#
# Server:
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simapp:/root/.simapp simapp simd init test-chain
# TODO: need to set validator in genesis so start runs
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simapp:/root/.simapp simapp simd start
#
# Client: (Note the simapp binary always looks at ~/.simapp we can bind to different local storage)
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys add foo
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys list
2020-06-24 05:15:08 -07:00
# TODO: demo connecting rest-server (or is this in server now?)
FROM golang:alpine AS build-env
# Install minimum necessary dependencies,
PlantUML diagrams (#8712) * Overview of keepers in object capability model (OCM) * Updates to the spec, making clarifications * Create a sequence diagram of a (fresh) delegation * Misc notes, not yet decided where to put them * Description of the shares abstraction in validators * Model all keeper dependencies and move the UML file to docs * Move and rename delegation sequence diagram * Move shares description * Remove TODO * Diagram touch-ups * Add how consensus power is calculated * remove temp file * Diagram improvements * Describe slashing in more detail * Describe redelegation * Describe unbonding * Delegation updates * Delegation updates * Make a diagram describing overall transaction flow * Add delegation flows for the events of tokens being bonded/unbonding/etc. * Grammar fix * Diagram updates: distinguish alts, remove numbering. * Use groups instead of "func:" participants * Remove unused keepers from dependency diagram * Add title to unbonding diagram * Move keeper dependencies * small doc updates * remove numbers on sequence diagram * !!!WIP EndBlock * Explain "Last"-prefix in storage * Remove `panic` step (they are supposed to never happen) * EndBlock sequence diagram (with TODOs) * Add TODO * More visible TODOs * Remove numbering * Complete EndBlock * Remove numbering * Remove TODOs and update title * add title back * remove endblock seq-diagram * Make power index update conditional on not being jailed * update title * Move files to /docs * Install PlantUML and compile images to png and txt * Use transaction flow in documentation * Use staking UML in staking docs * Clarify uml with inline doc * Add keeper deps diagram to docs * Only produce SVG images Co-authored-by: hjort <> Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 02:50:56 -07:00
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 plantuml
2020-06-24 05:15:08 -07:00
RUN apk add --no-cache $PACKAGES
# Set working directory for the build
WORKDIR /go/src/github.com/cosmos/cosmos-sdk
# Add source files
COPY . .
2020-09-25 07:07:05 -07:00
# install simapp, remove packages
RUN make build-linux
2020-06-24 05:15:08 -07:00
# Final image
FROM alpine:edge
# Install ca-certificates
RUN apk add --update ca-certificates
WORKDIR /root
# Copy over binaries from the build-env
2020-09-25 07:07:05 -07:00
COPY --from=build-env /go/src/github.com/cosmos/cosmos-sdk/build/simd /usr/bin/simd
2020-06-24 05:15:08 -07:00
EXPOSE 26656 26657 1317 9090
2020-06-24 05:15:08 -07:00
# Run simd by default, omit entrypoint to ease using container with simcli
CMD ["simd"]