From 240acb327371884c9ed0a9012f8be3bd96e91bc8 Mon Sep 17 00:00:00 2001 From: Hendarin Ono Date: Fri, 26 Sep 2025 11:21:50 +0700 Subject: [PATCH] update image --- Dockerfile | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a462759..9b977d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,30 @@ FROM debian:bullseye-slim -RUN adduser --disabled-password --gecos "" --no-create-home --uid 1000 cronos +# Create user & directories +RUN adduser --disabled-password --gecos "" --no-create-home --uid 1000 cronos \ + && mkdir -p /home/cronos/data /home/cronos/config /home/cronos/bin -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/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 \ - && rm cronos_1.5.0-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/ +# Install dependencies +RUN apt-get update -y && apt-get install -y wget curl procps net-tools jq lz4 + +WORKDIR /tmp + +# Download and verify tarball +RUN wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.0/cronos_1.5.0-testnet_Linux_x86_64.tar.gz \ + && echo "d917ca990ed2415905a44ec48d6047664dad06b3441cd09b116f86f1880b1c2b cronos_1.5.0-testnet_Linux_x86_64.tar.gz" | sha256sum -c - + +# Extract and move binary +RUN tar -xzf cronos_1.5.0-testnet_Linux_x86_64.tar.gz \ + && mv bin/cronosd /home/cronos/bin/cronosd \ + && rm -rf cronos_1.5.0-testnet_Linux_x86_64 cronos_1.5.0-testnet_Linux_x86_64.tar.gz + +# Validate binary hash +RUN sha256sum /home/cronos/bin/cronosd + +# Set permissions RUN chown -R cronos:cronos /home/cronos && chmod 1777 /tmp -USER root +USER cronos +WORKDIR /home/cronos ENTRYPOINT ["/home/cronos/bin/cronosd"]