Skip to content

Instantly share code, notes, and snippets.

@knarz
Last active April 22, 2022 20:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save knarz/da6868b520fa2d992ba635f394ee0277 to your computer and use it in GitHub Desktop.
Save knarz/da6868b520fa2d992ba635f394ee0277 to your computer and use it in GitHub Desktop.
cosmos testnet dockerfile
# vi: set ft=dockerfile :
# example usage
# docker build -t cosmos .
# docker run -d -v cosmos-data:/opt/cosmos --rm -ti --name cosmos-1 cosmos
# docker exec -it cosmos-1 sh
# /go/bin/basecli --home $BASECOIN_HOME keys add default
# /go/bin/gaiad --home $GAIAD_HOME show_validator
FROM golang:1-alpine
RUN apk add --no-cache git make
RUN mkdir -p /go/src/github.com/cosmos/
WORKDIR /go/src/github.com/cosmos/
RUN git clone https://github.com/cosmos/cosmos-sdk
WORKDIR /go/src/github.com/cosmos/cosmos-sdk
RUN git fetch --all
RUN git checkout develop
RUN make get_tools
RUN make get_vendor_deps
RUN make install
RUN make install_examples
ENV GAIAD_HOME=/opt/cosmos/gaiad
ENV BASECOIN_HOME=/opt/cosmos/basecoin
RUN mkdir -p $GAIAD_HOME
RUN /go/bin/gaiad --home $GAIAD_HOME init
RUN rm $GAIAD_HOME/config/genesis.json $GAIAD_HOME/config/config.toml
RUN wget -q -O $GAIAD_HOME/config/genesis.json https://raw.githubusercontent.com/tendermint/testnets/master/gaia-3006/gaia/genesis.json
RUN wget -q -O $GAIAD_HOME/config/config.toml https://raw.githubusercontent.com/tendermint/testnets/master/gaia-3006/gaia/config.toml
CMD /go/bin/gaiad --home $GAIAD_HOME start
EXPOSE 46656
@Mayank-blkchn
Copy link

Hi,
I have customised cosmos-sdk but when i am running make install through docker file its not pointing to my customised sdk and returning error as undefined . So , what to do so that make install download from my customised cosmos-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment