-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
executable file
·49 lines (43 loc) · 1.2 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
FROM python:3.12-slim-bookworm AS base
# variable store
ARG WDIR=/zero_build
ENV CONAN_UPLOAD_CUSTOM 0
# transfer sources from host to container
COPY . ${WDIR}
WORKDIR ${WDIR}
ENV PYTHONPATH ${WDIR}
# install system packages
RUN \
apt-get update \
&& \
apt-get install -y \
curl \
wget \
git \
gcc \
g++ \
libssl-dev \
python3 \
python3-pip \
make \
zip \
bc \
libgpgme-dev \
bison \
flex
# configure Python environment
RUN python3 -m pip install pip --upgrade && \
python3 -m pip install poetry && \
python3 -m poetry config virtualenvs.create false && \
python3 -m poetry install --no-root
# install shared tools from tools.json;
#
# The idea here is that we pre-pack all the tools into the Docker/Podman image that can be used for any device:
# (toolchains, binutils -- everything except device-specific kernel source);
#
# This significantly reduces the total build time, as each time we make a build call for a device,
# only device-specific kernel source is being downloaded into the container.
#
RUN python3 ${WDIR}/builder/utils/bridge.py --shared
# launch app
CMD [ "/bin/bash" ]