-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
34 lines (29 loc) · 1.12 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
# build with:
# docker build -t ml_build .
FROM debian:trixie-slim
LABEL description="Magiclantern Builder"
# clean is not needed with official Debian images,
# RUN apt-get clean
# update is required since we later install packages,
# and Debian images ship with empty apt cache
RUN apt-get update
# install stuff we need to build
RUN apt-get install -qy git vim build-essential gcc-arm-none-eabi python3 python3-docutils python3-setuptools zip
# create user for building with,
# and copy in the script that runs the build
RUN useradd -ms /bin/bash ml_builder
WORKDIR /home/ml_builder
RUN rm -f ml_build_setup.py
COPY ml_build_setup.py .
RUN chown ml_builder:ml_builder ml_build_setup.py
RUN chmod u+x ml_build_setup.py
USER ml_builder
# In order to allow Windows, Mac and Linux to all run
# the build in the same way, we want to avoid doing
# config via environment variables, because Windows
# is "special". The only other way I know to pass
# in params is via CMD, which if you specify here,
# then trailing args to docker run and docker create
# get passed to it.
ENTRYPOINT ["/home/ml_builder/ml_build_setup.py"]
CMD ["dummy_arg"]