~aleteoryx/muditaos

ref: 8fafd788a5ef70d89e4d20cb80052261d13d09ff muditaos/docker/Dockerfile.runner.in -rw-r--r-- 1.8 KiB
8fafd788 — Paweł Joński [BH-1346] Fix minute singular copy in Spanish 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
FROM ubuntu:focal

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

# ARM compiler
ADD assets/@ARM_GCC_PKG@ /usr/local/

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

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

ENV PATH="/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 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@"]