Skip to content

Commit 4482701

Browse files
authored
Merge pull request #83 from chainstack/feat/update-cronos-testnet-image-dockerfile
feat: cronos_1.5.0-testnet
2 parents beeb703 + 240acb3 commit 4482701

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

Dockerfile

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
FROM debian:bullseye-slim
22

3-
RUN adduser --disabled-password --gecos "" --no-create-home --uid 1000 cronos
3+
# Create user & directories
4+
RUN adduser --disabled-password --gecos "" --no-create-home --uid 1000 cronos \
5+
&& mkdir -p /home/cronos/data /home/cronos/config /home/cronos/bin
46

5-
RUN mkdir -p /home/cronos/data && mkdir -p /home/cronos/config
6-
RUN apt-get update -y && apt-get install wget curl procps net-tools jq lz4 -y
7-
RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.0/cronos_1.5.0-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.0-testnet_Linux_x86_64.tar.gz \
8-
&& rm cronos_1.5.0-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/
7+
# Install dependencies
8+
RUN apt-get update -y && apt-get install -y wget curl procps net-tools jq lz4
9+
10+
WORKDIR /tmp
11+
12+
# Download and verify tarball
13+
RUN wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.0/cronos_1.5.0-testnet_Linux_x86_64.tar.gz \
14+
&& echo "d917ca990ed2415905a44ec48d6047664dad06b3441cd09b116f86f1880b1c2b cronos_1.5.0-testnet_Linux_x86_64.tar.gz" | sha256sum -c -
15+
16+
# Extract and move binary
17+
RUN tar -xzf cronos_1.5.0-testnet_Linux_x86_64.tar.gz \
18+
&& mv bin/cronosd /home/cronos/bin/cronosd \
19+
&& rm -rf cronos_1.5.0-testnet_Linux_x86_64 cronos_1.5.0-testnet_Linux_x86_64.tar.gz
20+
21+
# Validate binary hash
22+
RUN sha256sum /home/cronos/bin/cronosd
23+
24+
# Set permissions
925
RUN chown -R cronos:cronos /home/cronos && chmod 1777 /tmp
1026

11-
USER root
27+
USER cronos
28+
WORKDIR /home/cronos
1229

1330
ENTRYPOINT ["/home/cronos/bin/cronosd"]

0 commit comments

Comments
 (0)