Skip to content
Merged
Changes from all commits
Commits
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
29 changes: 23 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]