Skip to content

Commit d4579f8

Browse files
committed
feat(sdk): porto service
1 parent f5eeeed commit d4579f8

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

packages/sdk/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,22 @@ RUN /usr/local/bin/docker-ensure-initdb.sh postgres
262262
FROM ${POSTGRES_BASE_IMAGE} AS rollups-database
263263
COPY --from=postgresql-initdb /var/lib/postgresql/data /var/lib/postgresql/data
264264

265+
################################################################################
266+
# porto build
267+
FROM node:${NODE_VERSION} AS porto
268+
ARG PORTO_VERSION
269+
270+
WORKDIR /src/app
271+
272+
RUN <<EOF
273+
corepack enable pnpm
274+
git clone --branch feature/cartesi --depth 1 --recurse-submodules https://github.com/tuler/porto
275+
cd porto
276+
pnpm install
277+
ANVIL=true pnpm --filter dialog build --base /porto/dialog
278+
ANVIL=true pnpm --filter manager build --base /porto/manager
279+
EOF
280+
265281
################################################################################
266282
# alto build
267283
FROM node:${NODE_VERSION} AS alto
@@ -312,6 +328,7 @@ ARG DEBIAN_FRONTEND=noninteractive
312328
RUN <<EOF
313329
apt-get update
314330
apt-get install -y --no-install-recommends \
331+
busybox \
315332
jq \
316333
libarchive-tools \
317334
libslirp0 \
@@ -371,6 +388,10 @@ cp -r "$(npm root -g)/@cartesi/devnet/deployments" /usr/share/cartesi/
371388
cp "$(npm root -g)/@cartesi/devnet/anvil_state.json" /usr/share/cartesi/
372389
EOF
373390

391+
# porto webapps
392+
COPY --from=porto /src/app/porto/apps/dialog/dist/dialog /usr/share/porto/dialog
393+
COPY --from=porto /src/app/porto/apps/manager/dist /usr/share/porto/manager
394+
374395
# Install linux kernel image
375396
RUN <<EOF
376397
curl -fsSL "https://github.com/cartesi/image-kernel/releases/download/v${CARTESI_IMAGE_KERNEL_VERSION}/linux-${CARTESI_LINUX_KERNEL_VERSION}.bin" \

packages/sdk/docker-bake.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ target "default" {
2424
GO_MIGRATE_VERSION = "4.18.2"
2525
NODE_VERSION = "22.15.1"
2626
NVM_VERSION = "977563e97ddc66facf3a8e31c6cff01d236f09bd" # 0.40.3
27+
PORTO_VERSION = "0.0.28"
2728
POSTGRES_BASE_IMAGE = "docker.io/library/postgres:17@sha256:7f29c02ba9eeff4de9a9f414d803faa0e6fe5e8d15ebe217e3e418c82e652b35"
2829
SU_EXEC_VERSION = "0.2"
2930
XGENEXT2_VERSION = "1.5.6"

0 commit comments

Comments
 (0)