Skip to content
Draft
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/chubby-ideas-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": patch
---

add cartesi sequencer:v0.1.0-alpha.7
18 changes: 18 additions & 0 deletions packages/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

################################################################################
# base image
FROM ${CARTESI_BASE_IMAGE} AS base

Check warning on line 8 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${CARTESI_BASE_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
Expand Down Expand Up @@ -136,6 +136,23 @@
telegraf --version
EOF

################################################################################
# install cartesi-sequencer
FROM base AS cartesi-sequencer
ARG CARTESI_SEQUENCER_VERSION
ARG TARGETARCH
RUN <<EOF
curl -fsSL https://github.com/cartesi/sequencer/releases/download/v${CARTESI_SEQUENCER_VERSION}/sequencer-v${CARTESI_SEQUENCER_VERSION}-linux-${TARGETARCH}.tar.gz \
-o /tmp/sequencer.tar.gz
case "${TARGETARCH}" in
amd64) echo "4bf51df82406244769bfa2c9b75021099fe39f399cc2092306b4d6082e3a3d3d /tmp/sequencer.tar.gz" | sha256sum --check ;;
arm64) echo "a972fc723d8c8824170831ee0d5ee7afd51758da5a2e4973715452565afc319c /tmp/sequencer.tar.gz" | sha256sum --check ;;
*) echo "unsupported architecture: ${TARGETARCH}"; exit 1 ;;
esac
tar -xvzf /tmp/sequencer.tar.gz -C /usr/local/bin --strip-components=1 sequencer-v${CARTESI_SEQUENCER_VERSION}-linux-${TARGETARCH}/sequencer
sequencer --version
EOF

################################################################################
# cartesi rollups-runtime target
FROM base AS rollups-runtime
Expand Down Expand Up @@ -202,6 +219,7 @@
COPY --from=nitro /usr/local/src/nitroctl /usr/local/bin/
COPY --from=tini /usr/local/bin/tini /usr/local/bin/
COPY --from=telegraf /usr/local/bin/telegraf /usr/local/bin/
COPY --from=cartesi-sequencer /usr/local/bin/sequencer /usr/local/bin/
COPY skel/ /
RUN <<EOF
mkdir -p /run/nitro
Expand All @@ -213,7 +231,7 @@

################################################################################
# postgresql initdb
FROM ${POSTGRES_BASE_IMAGE} AS postgresql-initdb

Check warning on line 234 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${POSTGRES_BASE_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
Expand All @@ -226,7 +244,7 @@
COPY --from=rollups-runtime /usr/bin/cartesi-rollups-cli /usr/bin/
COPY --from=rollups-runtime /usr/lib/libcartesi* /usr/lib/

ARG POSTGRES_PASSWORD=password

Check warning on line 247 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "POSTGRES_PASSWORD") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

# create rollupsdb databases
COPY <<EOF /docker-entrypoint-initdb.d/00-createdb.sql
Expand All @@ -246,12 +264,12 @@

################################################################################
# rollups-database image
FROM ${POSTGRES_BASE_IMAGE} AS rollups-database

Check warning on line 267 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${POSTGRES_BASE_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
COPY --from=postgresql-initdb /var/lib/postgresql/data /var/lib/postgresql/data

################################################################################
# alto build
FROM node:${NODE_VERSION} AS alto

Check warning on line 272 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG node:${NODE_VERSION} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
ARG ALTO_VERSION
ARG NODE_VERSION
ARG TARGETARCH
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ target "default" {
CARTESI_PASSKEY_SERVER_VERSION = "1.0.1"
CARTESI_PAYMASTER_VERSION = "0.2.0"
CARTESI_ROLLUPS_NODE_VERSION = "2.0.0-alpha.12"
CARTESI_SEQUENCER_VERSION = "0.1.0-alpha.7"
FOUNDRY_VERSION = "1.4.3"
NITRO_VERSION = "c937fa4fd202074dd250086ebd92de6884968b84" # v0.8.1
NODE_VERSION = "24.14.0"
Expand Down
Loading