Files
nomos-node/Dockerfile
T

49 lines
1.6 KiB
Docker

# syntax=docker/dockerfile:1
# check=skip=SecretsUsedInArgOrEnv
# Ignore warnings about sensitive information as this is test data.
ARG LB_NODE_VERSION=0.1.3
ARG LB_CIRCUITS_VERSION=v0.5.1
# ===========================
# BUILD IMAGE
# ===========================
FROM alpine:latest AS builder
ARG LB_NODE_VERSION
ARG LB_CIRCUITS_VERSION
WORKDIR /logos-blockchain
COPY . .
RUN apk add --no-cache curl bash
RUN scripts/setup-logos-blockchain-circuits.sh "$LB_CIRCUITS_VERSION" "linux-$(uname -m)"
RUN scripts/setup-logos-blockchain-node.sh "$LB_NODE_VERSION" "linux-$(uname -m)"
# ===========================
# NODE IMAGE
# ===========================
FROM debian:trixie-slim
LABEL maintainer="augustinas@status.im" \
source="https://github.com/logos-blockchain/logos-blockchain" \
description="Logos blockchain node image"
# curl: allows querying the node's REST API from within the container without exposing it publicly
# yq: allows patching user_config.yaml after it is generated by `logos-blockchain-node init`
RUN apt-get update && apt-get install -y --no-install-recommends curl yq && \
rm -rf /var/lib/apt/lists/*
# Copies the entire cache dir.
# We only need the circuits, but this is currently much simpler than just copying the circuits subdir.
# This might be addressed later, after the circuits directories structure is standardised.
RUN mkdir -p /home/runner/.cache/logos/blockchain/
COPY --from=builder /opt/circuits /home/runner/.cache/logos/blockchain/
COPY --from=builder /usr/local/bin/logos-blockchain-node /usr/local/bin/logos-blockchain-node
EXPOSE 3000 8080 9000 60000
ENTRYPOINT ["logos-blockchain-node"]