Skip to content

Commit

Permalink
add force tag option and enable built-in explorer instead of sui-loca…
Browse files Browse the repository at this point in the history
…l-explorer
  • Loading branch information
K-NRS committed Sep 12, 2024
1 parent 5751406 commit d6046bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM debian:stable-slim

ARG USER=sui
ARG FORCE_TAG

# Set environment variables
ENV USER=${USER}
Expand Down Expand Up @@ -30,12 +31,6 @@ WORKDIR ${HOME}
RUN sudo apt-get update && sudo apt-get install -y \
lsof curl git-all cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential

# Install npm and sui-explorer-local
RUN sudo apt-get install -y npm && \
sudo npm install -g n && \
sudo n stable && \
sudo npm install -g sui-explorer-local

# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Expand All @@ -49,16 +44,21 @@ RUN cd ~
RUN git clone https://github.com/chainmovers/suibase.git ./suibase
RUN cd ./suibase && ./install

# Run localnet for once then exit
RUN localnet start && localnet stop
RUN localnet create

# Start sui-explorer-local for once then exit
RUN sui-explorer-local start && sui-explorer-local stop
ENV FORCE_TAG=${FORCE_TAG}
ENV config=${HOME}/suibase/workdirs/localnet/suibase.yaml
# if FORCE_TAG is set, then checkout to the specified tag
RUN if [ -n "$FORCE_TAG" ]; then \
echo '' >> ${config} \
echo 'force_tag: "${FORCE_TAG}" >> ${config}; \
localnet update; \
fi
# Expose ports
EXPOSE 9000
EXPOSE 44340
EXPOSE 9001
EXPOSE 44380
ENTRYPOINT ["/bin/bash"]
Expand Down
1 change: 0 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
localnet start &! && \
sui-explorer-local start &! && \
tail -f ~/suibase/workdirs/common/logs/suibase-daemon.log

0 comments on commit d6046bf

Please sign in to comment.