forked from cartesi/rollups-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 882 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# syntax=docker.io/docker/dockerfile:1.4
# build stage: includes resources necessary for installing dependencies
FROM --platform=linux/riscv64 cartesi/python:3.10-slim-jammy as build-stage
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential=12.9ubuntu3 \
&& rm -rf /var/lib/apt/lists/* \
&& find /var/log \( -name '*.log' -o -name '*.log.*' \) -exec truncate -s 0 {} \;
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache \
&& find /opt/venv -type d -name __pycache__ -exec rm -r {} +
# runtime stage: produces final image that will be executed
FROM --platform=linux/riscv64 cartesi/python:3.10-slim-jammy
COPY --from=build-stage /opt/venv /opt/venv
WORKDIR /opt/cartesi/dapp
COPY ./entrypoint.sh .
COPY ./erc20.py .
COPY ./eth_abi_ext.py .