~aleteoryx/muditaos

ref: 55bd0f3ae8ebb5cb0b93da0098949f7c2a0bef76 muditaos/docker/Dockerfile.runner.in -rw-r--r-- 2.2 KiB
55bd0f3a — Marcin Zieliński [MOS-838] Unable to unlock SIM card (corner case) 3 years ago
                                                                                
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM ubuntu:jammy

MAINTAINER ops@mudita.com
# Docker runner for MuditaOS builds

RUN ln -fs /usr/share/zoneinfo/@DOCKER_TIMEZONE@ /etc/localtime
RUN export DEBIAN_FRONTEND=noninteractive 
RUN apt-get update

RUN apt-get full-upgrade -y 
RUN apt-get install -y \
        @INSTALL_PACKAGES@
RUN apt-get -qy autoremove
RUN apt-get -qy clean
RUN ln -fs /usr/bin/python3 /usr/bin/python
RUN locale-gen pl_PL.UTF-8 \
               en_US.UTF-8 \
               de_DE.UTF-8 \
               es_ES.UTF-8 && \
    dpkg-reconfigure --frontend noninteractive tzdata
RUN mkdir -p /home/runner/app/settings

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 1000 --slave /usr/bin/g++ g++ /usr/bin/g++-10

RUN apt-get install software-properties-common -y
RUN add-apt-repository ppa:git-core/ppa -y
RUN apt-get update
RUN apt-get install git -y

#add python packages
ADD assets/requirements.txt /home/docker/requirements.txt
RUN pip3 install -r /home/docker/requirements.txt
RUN apt-get remove ccache -y

# ARM compiler
ADD assets/@ARM_GCC_PKG@ /usr/local/
# CodeQL
ADD assets/@CODEQL_PKG@ /usr/local/
RUN cd /usr/local && unzip @CODEQL_PKG@ && rm @CODEQL_PKG@

# CMake
ADD assets/@CMAKE_PKG@ /usr/local/

RUN wget https://github.com/ccache/ccache/releases/download/v4.7/ccache-4.7-linux-x86_64.tar.xz && tar -xvf ccache-4.7-linux-x86_64.tar.xz  && cd ccache-4.7-linux-x86_64/ &&  make install


ENV CMAKE_NAME="/usr/local/@CMAKE_NAME@"
ENV ARM_GCC="/usr/local/@ARM_GCC@"

ENV PATH="/usr/local/codeql:/user/local/actions-runner:/usr/local/@CMAKE_NAME@/bin:/usr/local/@ARM_GCC@/bin:$PATH"
ENV TERM="xterm-256color"

ADD assets/.bashrc /home/docker/

COPY assets/cmd.sh /cmd.sh
COPY assets/entrypoint.sh /entrypoint.sh
COPY ci_actions.sh /ci_actions.sh

RUN echo "export PATH="/user/local/actions-runner:/usr/local/@CMAKE_NAME@/bin:/usr/local/@ARM_GCC@/bin:$PATH"" > /etc/profile.d/setup_path.sh
RUN echo "export PATH="/usr/local/codeql/:$PATH"" > /etc/profile.d/setup_path.sh
RUN chmod +x /etc/profile.d/setup_path.sh
RUN chmod +x /cmd.sh && \
    chmod +x /entrypoint.sh && \
    groupadd -r runner && \
    useradd --no-log-init -r -g runner runner && \
    chown -R runner:runner /home/runner

WORKDIR /home/runner/app

USER runner

ENTRYPOINT ["/@ENTRYPOINT@"]