-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f50f90c
commit eeccb1c
Showing
7 changed files
with
747 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
go, | ||
javascript, | ||
lua, | ||
php, | ||
python, | ||
ruby, | ||
rust, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.cartesi | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.cartesi | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# syntax=docker.io/docker/dockerfile:1 | ||
|
||
# This enforces that the packages downloaded from the repositories are the same | ||
# for the defined date, no matter when the image is built. | ||
ARG UBUNTU_TAG=noble-20240827.1 | ||
ARG APT_UPDATE_SNAPSHOT=20240827T030400Z | ||
|
||
################################################################################ | ||
# riscv64 base stage | ||
FROM --platform=linux/riscv64 ubuntu:${UBUNTU_TAG} AS base | ||
|
||
ARG APT_UPDATE_SNAPSHOT | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN <<EOF | ||
set -eu | ||
apt update | ||
apt install -y --no-install-recommends ca-certificates | ||
apt update --snapshot=${APT_UPDATE_SNAPSHOT} | ||
EOF | ||
|
||
FROM base AS builder | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN <<EOF | ||
set -e | ||
apt-get install -y --no-install-recommends \ | ||
php8.3-cli \ | ||
php8.3-curl \ | ||
composer \ | ||
git \ | ||
unzip | ||
rm -rf /var/apt/lists/* | ||
EOF | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY composer.json composer.lock ./ | ||
RUN composer install | ||
|
||
FROM base | ||
|
||
ARG MACHINE_EMULATOR_TOOLS_VERSION=0.14.1 | ||
ADD https://github.com/cartesi/machine-emulator-tools/releases/download/v${MACHINE_EMULATOR_TOOLS_VERSION}/machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb / | ||
RUN dpkg -i /machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb \ | ||
&& rm /machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb | ||
|
||
LABEL io.cartesi.rollups.sdk_version=0.10.0 | ||
LABEL io.cartesi.rollups.ram_size=128Mi | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN <<EOF | ||
set -e | ||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
busybox-static \ | ||
php8.3-cli \ | ||
php8.3-curl | ||
rm -rf /var/lib/apt/lists/* /var/log/* /var/cache/* | ||
useradd --create-home --user-group dapp | ||
EOF | ||
|
||
ENV PATH="/opt/cartesi/bin:${PATH}" | ||
|
||
COPY --from=builder /usr/src/app/vendor /usr/src/app/vendor | ||
|
||
WORKDIR /usr/src/app | ||
COPY index.php . | ||
|
||
ENTRYPOINT ["rollup-init"] | ||
CMD ["php", "index.php"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require": { | ||
"guzzlehttp/guzzle": "^7.0" | ||
} | ||
} |
Oops, something went wrong.