Skip to content
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3f43e43
CORE-4992 add dockerfiles for testnet and mainnet
inoob26 Oct 10, 2022
872e82c
added EOF
inoob26 Oct 10, 2022
07c6d61
reduce operations
inoob26 Oct 12, 2022
5f8a9fa
CORE-4992 add testnet Dockerfile
inoob26 Oct 13, 2022
c9c437a
upgrade client to v1.0.0-rc3
inoob26 Nov 19, 2022
2a96edb
Merge pull request #7 from chainstack/feature/update-testnet-v1.0.0-rc3
inoob26 Nov 19, 2022
642cb37
Update client to v1.0.0-rc4
inoob26 Nov 19, 2022
b55fd6e
Merge pull request #8 from chainstack/feature/update-client-v1.0.0-rc4
inoob26 Nov 19, 2022
c66865c
Update client to v1.0.2
inoob26 Jan 10, 2023
03112b3
Merge pull request #10 from chainstack/update-testnet-client-v1.0.2
inoob26 Jan 10, 2023
f25030f
cronos testnet image upgrade
Apr 13, 2023
5fd9b1d
Merge pull request #17 from chainstack/feature/ops-1800-cronos-testne…
avinashbo Apr 13, 2023
16b3a72
image upgrade
May 31, 2023
a7487df
Merge pull request #20 from chainstack/feature/ops-2115-image-bump
AlbertMakhortov May 31, 2023
34ab340
cronos testnet image upgrade
Jun 28, 2023
40efcbb
Merge branch 'testnet' into feature/ops-2216-cronos-testnet-image-upg…
AlbertMakhortov Jun 28, 2023
bb386ed
Merge pull request #23 from chainstack/feature/ops-2216-cronos-testne…
AlbertMakhortov Jun 28, 2023
da8feb8
feature/cronos-testnet-v1.0.11
darinvhs Sep 19, 2023
21fbbfa
Merge pull request #26 from chainstack/feature/cronos-testnet-v1.0.11
darinvhs Sep 19, 2023
bba7f63
bump 1.1.0-rc0
Oct 12, 2023
36c68e5
Merge pull request #28 from chainstack/feature/cronos-testnet-1.1.0-r…
ovceev Oct 12, 2023
0301b54
Fix panic
avinashbo Nov 12, 2024
7b9e517
Merge pull request #53 from chainstack/bug/1.4.0-rc3-testnet
avinashbo Nov 12, 2024
fb63205
Fix version
avinashbo Nov 12, 2024
cf3423a
Merge pull request #54 from chainstack/bug/1.4.0-rc3-testnet
avinashbo Nov 12, 2024
5f5899b
Updated testnet image to 1.4.0-rc4
mukul3097 Nov 15, 2024
473ce79
Merge pull request #55 from chainstack/feature/upgrade-testnet-version
mukul3097 Nov 15, 2024
12ac4c1
v1.4.8
alex-kulam Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM debian:bullseye-slim
FROM debian:bullseye-slim@sha256:34b63f55a4b193ad03c5ddb4b3f8546c797763ed708f0df5309ecb9507d15179

RUN adduser --disabled-password --gecos "" --no-create-home --uid 1000 cronos

RUN mkdir -p /home/cronos/data && mkdir -p /home/cronos/config
RUN apt-get update -y && apt-get install wget curl procps net-tools jq lz4 -y
RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v0.8.1/cronos_0.8.1_Linux_x86_64.tar.gz && tar -xvf cronos_0.8.1_Linux_x86_64.tar.gz \
&& rm cronos_0.8.1_Linux_x86_64.tar.gz && mv ./* /home/cronos/

RUN cd /home/cronos && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.4.8/cronos_1.4.8-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.4.8-testnet_Linux_x86_64.tar.gz \
&& rm cronos_1.4.8-testnet_Linux_x86_64.tar.gz
Comment on lines +8 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Remove --no-check-certificate and add integrity checks for the binary download

Disabling TLS validation (--no-check-certificate) opens the build to MITM attacks.
At a minimum, keep certificate verification enabled and verify the tarball’s checksum:

-RUN cd /home/cronos && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.4.8/cronos_1.4.8-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.4.8-testnet_Linux_x86_64.tar.gz \
-    && rm cronos_1.4.8-testnet_Linux_x86_64.tar.gz
+RUN set -eu; \
+    cd /home/cronos; \
+    wget --https-only https://github.com/crypto-org-chain/cronos/releases/download/v1.4.8/cronos_1.4.8-testnet_Linux_x86_64.tar.gz; \
+    echo "<SHA256  expected>  cronos_1.4.8-testnet_Linux_x86_64.tar.gz" | sha256sum -c -; \
+    tar --strip-components=1 -xvf cronos_1.4.8-testnet_Linux_x86_64.tar.gz; \
+    rm cronos_1.4.8-testnet_Linux_x86_64.tar.gz

This keeps TLS verification, checks the archive hash, flattens the directory (--strip-components=1) and cleans up in a single layer.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
RUN cd /home/cronos && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.4.8/cronos_1.4.8-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.4.8-testnet_Linux_x86_64.tar.gz \
&& rm cronos_1.4.8-testnet_Linux_x86_64.tar.gz
RUN set -eu; \
cd /home/cronos; \
wget --https-only https://github.com/crypto-org-chain/cronos/releases/download/v1.4.8/cronos_1.4.8-testnet_Linux_x86_64.tar.gz; \
echo "<SHA256 expected> cronos_1.4.8-testnet_Linux_x86_64.tar.gz" | sha256sum -c -; \
tar --strip-components=1 -xvf cronos_1.4.8-testnet_Linux_x86_64.tar.gz; \
rm cronos_1.4.8-testnet_Linux_x86_64.tar.gz
🧰 Tools
🪛 Checkov (3.2.334)

[HIGH] 8-9: Ensure that certificate validation isn't disabled with wget

(CKV2_DOCKER_3)

🤖 Prompt for AI Agents
In Dockerfile lines 8 to 9, remove the wget option `--no-check-certificate` to
re-enable TLS certificate verification and add a step to verify the downloaded
tarball's checksum using a known hash value. Also, update the tar extraction
command to include `--strip-components=1` to flatten the directory structure.
Ensure all these steps are combined in a single RUN layer and clean up the
tarball after verification and extraction.


RUN chown -R cronos:cronos /home/cronos

USER cronos

ENTRYPOINT ["/home/cronos/bin/cronosd"]
ENTRYPOINT ["/home/cronos/bin/cronosd"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

ENTRYPOINT path may be wrong – container will fail to start

After the extraction step you do not move the files, so the binary likely resides at
/home/cronos/cronos_1.4.8-testnet_Linux_x86_64/bin/cronosd (or, with the suggested --strip-components=1, at /home/cronos/bin/cronosd).
However, the ENTRYPOINT points to /home/cronos/bin/cronosd without guaranteeing that path exists.

Please either:

  1. Keep the current extraction layout and adjust ENTRYPOINT:
-ENTRYPOINT ["/home/cronos/bin/cronosd"]
+ENTRYPOINT ["/home/cronos/cronos_1.4.8-testnet_Linux_x86_64/bin/cronosd"]
  1. Or adopt the --strip-components=1 refactor above and leave the ENTRYPOINT as-is.

Without this fix the image will exit with “file not found”.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ENTRYPOINT ["/home/cronos/bin/cronosd"]
ENTRYPOINT ["/home/cronos/cronos_1.4.8-testnet_Linux_x86_64/bin/cronosd"]
🤖 Prompt for AI Agents
In Dockerfile at line 15, the ENTRYPOINT path points to
/home/cronos/bin/cronosd, but the binary is not guaranteed to be there after
extraction. To fix this, either adjust the ENTRYPOINT to the actual extracted
path /home/cronos/cronos_1.4.8-testnet_Linux_x86_64/bin/cronosd if you keep the
extraction layout as is, or modify the extraction step to use
--strip-components=1 so the binary is placed directly in /home/cronos/bin/,
allowing the ENTRYPOINT to remain unchanged.