~aleteoryx/muditaos

ref: 5ac4d1e18c649913a8f3c5ca4e5106e31289fc8a muditaos/docker/jenkins-docker/Dockerfile-jenkins.runner.in -rw-r--r-- 1.5 KiB
5ac4d1e1 — Lefucjusz [MOS-000] Bump binaries and add Bell target 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
FROM wearemudita/mudita_os_builder:latest

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

USER root

RUN export DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN apt-get full-upgrade -y

RUN apt-get install -y \
        openssh-server \
        openjdk-11-jdk

RUN apt-get -qy clean

#Docker drops audit-related capabilities, removing from pam requirements
RUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd

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

RUN sed -i /etc/ssh/sshd_config \
        -e 's/#PermitRootLogin.*/PermitRootLogin no/' \
        -e 's/#RSAAuthentication.*/RSAAuthentication yes/'  \
        -e 's/#PasswordAuthentication.*/PasswordAuthentication no/' \
        -e 's/#SyslogFacility.*/SyslogFacility AUTH/' \
        -e 's/#LogLevel.*/LogLevel INFO/'

RUN mkdir -p /var/run/sshd

RUN adduser --quiet --gecos '' --disabled-password --uid 6666 jenkins

COPY .ssh/authorized_keys /home/jenkins/.ssh/authorized_keys
COPY start-sshd /usr/local/bin/start-sshd
RUN chown -R jenkins:jenkins /home/jenkins/.ssh
RUN echo "export PATH="/usr/local/codeql:/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 cat /etc/profile.d/setup_path.sh >> /home/jenkins/.bashrc


EXPOSE 22

ENTRYPOINT ["/usr/local/bin/start-sshd"]