Skip to content

Commit

Permalink
change healthcheck command in dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed Sep 12, 2024
1 parent d9e0cbb commit 941f4a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
35 changes: 16 additions & 19 deletions Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ WORKDIR /code
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
protobuf-compiler \
curl \
git \
llvm \
clang \
automake \
libtool \
pkg-config \
make && \
ca-certificates \
protobuf-compiler \
curl \
git \
llvm \
clang \
automake \
libtool \
pkg-config \
make && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION

RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown
Expand All @@ -43,11 +43,11 @@ ARG SUBSTRATE_CLI_GIT_COMMIT_HASH

RUN \
/root/.cargo/bin/cargo -Zgitoxide -Zgit build \
--locked \
-Z build-std \
--profile $PROFILE \
--bin subspace-node \
--target $(uname -p)-unknown-linux-gnu && \
--locked \
-Z build-std \
--profile $PROFILE \
--bin subspace-node \
--target $(uname -p)-unknown-linux-gnu && \
mv target/*/*/subspace-node subspace-node && \
rm -rf target

Expand All @@ -59,10 +59,7 @@ RUN \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

HEALTHCHECK CMD curl \
-H "Content-Type: application/json" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }' \
-f "http://localhost:9944"
HEALTHCHECK CMD curl -v localhost:9944/health

COPY --from=0 /code/subspace-node /subspace-node

Expand Down
5 changes: 1 addition & 4 deletions Dockerfile-node.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ RUN \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

HEALTHCHECK CMD curl \
-H "Content-Type: application/json" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }' \
-f "http://localhost:9944"
HEALTHCHECK CMD curl -v localhost:9944/health

COPY --from=0 /code/subspace-node /subspace-node

Expand Down

0 comments on commit 941f4a2

Please sign in to comment.