Skip to content

Commit 392f998

Browse files
committed
Install wscat inside Dockerfile
1 parent 5f96aa3 commit 392f998

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

shutter/Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,24 @@ RUN mkdir -p ${KEYPER_CONFIG_DIR} ${SHUTTER_CHAIN_DIR} ${ASSETS_DIR} /opt/superv
4949
COPY scripts /usr/local/bin/
5050
COPY --from=assets ${ASSETS_DIR}/ ${ASSETS_DIR}/
5151

52+
RUN apt-get update && apt-get install -y \
53+
ca-certificates \
54+
curl
55+
56+
ARG NODE_VERSION=22.14.0
57+
ARG NODE_PACKAGE=node-v$NODE_VERSION-linux-x64
58+
ARG NODE_HOME=/opt/$NODE_PACKAGE
59+
60+
ENV NODE_PATH $NODE_HOME/lib/node_modules
61+
ENV PATH $NODE_HOME/bin:$PATH
62+
63+
RUN curl https://nodejs.org/dist/v$NODE_VERSION/$NODE_PACKAGE.tar.gz | tar -xzC /opt/
64+
65+
RUN npm install -g wscat
66+
5267
# Placed here to rebuild less layers
5368
ENV CHAIN_PORT=${CHAIN_PORT} \
5469
SHUTTER_P2P_LISTENADDRESSES="/ip4/0.0.0.0/tcp/${KEYPER_PORT},/ip4/0.0.0.0/udp/${KEYPER_PORT}/quic-v1" \
5570
NETWORK=${NETWORK}
5671

57-
ENTRYPOINT ["supervisord", "-c", "/etc/supervisord.conf"]
72+
ENTRYPOINT ["supervisord", "-c", "/etc/supervisord.conf"]

shutter/scripts/configure_keyper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
# shellcheck disable=SC1091
77
. "${ASSETS_DIR}/variables.env"
88

9+
NODE_VERSION=22.14.0
10+
NODE_PACKAGE=node-v$NODE_VERSION-linux-x64
11+
NODE_HOME=/opt/$NODE_PACKAGE
12+
13+
NODE_PATH=$NODE_HOME/lib/node_modules
14+
PATH=$NODE_HOME/bin:$PATH
15+
916
function test_ethereum_url() {
1017
RESULT=$(wscat -c "$SHUTTER_NETWORK_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}')
1118
if [[ $RESULT =~ '"id":1' ]]; then return 0; else

0 commit comments

Comments
 (0)