Skip to content

Commit a278341

Browse files
committed
feat(sdk): porto service
1 parent f43ae9c commit a278341

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

packages/sdk/Dockerfile

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

218+
################################################################################
219+
# porto build
220+
FROM node:${NODE_VERSION} AS porto
221+
ARG PORTO_VERSION
222+
223+
WORKDIR /src/app
224+
225+
RUN <<EOF
226+
corepack enable pnpm
227+
git clone --branch feature/cartesi --depth 1 --recurse-submodules https://github.com/tuler/porto
228+
cd porto
229+
pnpm install
230+
ANVIL=true pnpm --filter dialog build --base /porto/dialog
231+
ANVIL=true pnpm --filter manager build --base /porto/manager
232+
EOF
233+
218234
################################################################################
219235
# alto build
220236
FROM node:${NODE_VERSION} AS alto
@@ -265,6 +281,7 @@ ARG DEBIAN_FRONTEND=noninteractive
265281
RUN <<EOF
266282
apt-get update
267283
apt-get install -y --no-install-recommends \
284+
busybox \
268285
jq \
269286
libarchive-tools \
270287
libslirp0 \
@@ -324,6 +341,10 @@ cp -r "$(npm root -g)/@cartesi/devnet/deployments" /usr/share/cartesi/
324341
cp "$(npm root -g)/@cartesi/devnet/anvil_state.json" /usr/share/cartesi/
325342
EOF
326343

344+
# porto webapps
345+
COPY --from=porto /src/app/porto/apps/dialog/dist/dialog /usr/share/porto/dialog
346+
COPY --from=porto /src/app/porto/apps/manager/dist /usr/share/porto/manager
347+
327348
# Install linux kernel image
328349
RUN <<EOF
329350
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
@@ -22,6 +22,7 @@ target "default" {
2222
GO_MIGRATE_VERSION = "4.18.2"
2323
NODE_VERSION = "22.15.1"
2424
NVM_VERSION = "977563e97ddc66facf3a8e31c6cff01d236f09bd" # 0.40.3
25+
PORTO_VERSION = "0.0.28"
2526
POSTGRES_BASE_IMAGE = "docker.io/library/postgres:17@sha256:7f29c02ba9eeff4de9a9f414d803faa0e6fe5e8d15ebe217e3e418c82e652b35"
2627
SU_EXEC_VERSION = "0.2"
2728
XGENEXT2_VERSION = "1.5.6"

0 commit comments

Comments
 (0)