Skip to content

Commit

Permalink
Merge pull request #31 from koxu1996/backport/pr-26
Browse files Browse the repository at this point in the history
Backport #26 into `dev`
  • Loading branch information
cnorburn committed Jul 19, 2024
2 parents f36be0c + e220758 commit a8262c1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore everything by default
*

# Expose CCTL source.
!./cmds
!./resources
!./utils
!./activate

# Expose additional docker scripts.
!./docker
17 changes: 11 additions & 6 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ RUN curl -f -L https://static.rust-lang.org/rustup.sh -O \
&& sh rustup.sh -y
ENV PATH="$PATH:/root/.cargo/bin"

RUN git clone https://github.com/casper-network/casper-node-launcher.git \
&& git clone https://github.com/casper-network/cctl.git
RUN git clone https://github.com/casper-network/casper-node-launcher.git
RUN if [ -n "$NODE_COMMIT" ]; then \
git clone -b $NODE_COMMIT $NODE_REPO; \
else \
Expand All @@ -41,16 +40,22 @@ RUN if [ -n "$NODE_COMMIT" ]; then \
git clone -b $CLIENT_GITBRANCH $CLIENT_REPO; \
fi

# Local CCTL source code.
COPY ./cmds ./cctl/cmds
COPY ./resources ./cctl/resources
COPY ./utils ./cctl/utils
COPY ./activate ./cctl/activate

WORKDIR /casper-node

RUN make setup-rs && echo '. /cctl/activate' >> ~/.bashrc

WORKDIR /

COPY ./build.sh .
RUN chmod +x build.sh && source build.sh
COPY ./docker/build.sh .
RUN chmod +x ./build.sh && source build.sh

COPY ./clean.sh .
COPY ./docker/clean.sh .
RUN chmod +x clean.sh && source clean.sh

FROM debian:buster as run
Expand All @@ -77,7 +82,7 @@ ENV CCTL="/home/cctl/cctl"

RUN echo "source $CCTL/activate" >> .bashrc

COPY --chown=cctl:cctl ./start.sh .
COPY --chown=cctl:cctl ./docker/start.sh .
RUN chmod +x start.sh

EXPOSE 11101-11105 14101-14105 18101-18105
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ After starting docker on your machine follow these simple instructions:

Build and run using `docker build` or `docker compose`:
```bash
git clone [email protected]:casper-network/cctl.git && cd cctl/docker
git clone [email protected]:casper-network/cctl.git && cd cctl

docker build . --build-arg NODE_GITBRANCH=release-1.5.6 --build-arg CLIENT_GITBRANCH=release-2.0.0 -t cspr-cctl/release-1.5.6
# or
Expand Down
1 change: 0 additions & 1 deletion docker/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ rm -r casper-client-rs/target/release/.fingerprint
rm -r casper-node/.git
rm -r casper-clinet-rs/.git
rm -r casper-node-launcher/.git
rm -r cctl/.git
rm -r casper-node/utils/nctl
rm -r casper-node/utils/nctl-metrics

0 comments on commit a8262c1

Please sign in to comment.