-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
38 lines (27 loc) · 937 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
30
31
32
33
34
35
36
37
FROM ghcr.io/foundry-rs/foundry:latest
# Install Python 3.9
WORKDIR /app
ARG PYTHON_VERSION=3.9.9
# install build dependencies and needed tools
RUN apk add \
wget \
gcc \
make \
zlib-dev \
libffi-dev \
openssl-dev \
musl-dev
# download and extract python sources
RUN cd /opt \
&& wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \
&& tar xzf Python-${PYTHON_VERSION}.tgz
# build python and remove left-over sources
RUN cd /opt/Python-${PYTHON_VERSION} \
&& ./configure --prefix=/usr --enable-optimizations --with-ensurepip=install \
&& make install \
&& rm /opt/Python-${PYTHON_VERSION}.tgz /opt/Python-${PYTHON_VERSION} -rf
COPY . .
# We install this directly as we dont need a virtual environment in Docker
RUN pip3 install -r requirements.txt
RUN forge install
ENTRYPOINT [ "/bin/sh" ]