Skip to content

Commit

Permalink
dockerfile with rosetta working
Browse files Browse the repository at this point in the history
  • Loading branch information
bizk committed Jan 1, 2024
1 parent 0735ceb commit 8bfa664
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
25 changes: 5 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN export SIMD_BIN=/go/src/github.com/cosmos/cosmos-sdk/build/simd && make init
# ------------------------------------------------------------------------------
# Build rosetta
# ------------------------------------------------------------------------------
FROM golang:1.20.10 AS rosetta
FROM golang:1.21.5 AS rosetta

ARG ROSETTA_VERSION

Expand All @@ -29,32 +29,17 @@ RUN git checkout $ROSETTA_VERSION && \
go mod download

RUN make build


# ------------------------------------------------------------------------------
# Target container for running the node and rosetta server
# ------------------------------------------------------------------------------
FROM golang:1.20.10

# Install dependencies
RUN apt-get update -y && \
apt-get install -y wget

WORKDIR /app
RUN cd plugins/cosmos-hub && make plugin

COPY --from=cosmos \
/go/src/github.com/cosmos/cosmos-sdk/build/simd \
/app/simd

# Install rosetta server
COPY --from=rosetta \
/go/src/github.com/cosmos/rosetta/rosetta \
/app/rosetta
COPY --from=cosmos \
/root/.simapp \
/root/.simapp

## Install service start script
ADD scripts/entrypoint.sh /scripts/entrypoint.sh
USER root

RUN chmod +x /scripts/entrypoint.sh

EXPOSE 9650
Expand Down
3 changes: 2 additions & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/app/simd start &
/app/rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090"
sleep 30
./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090"

0 comments on commit 8bfa664

Please sign in to comment.