blob: 686d4fa32f61db3b5153e039f0f97b4184fe1f29 [file] [log] [blame]
Yi Tsengaae6ef52021-09-01 13:48:27 -07001# SPDX-FileCopyrightText: Copyright 2021-present Open Networking Foundation.
2# SPDX-License-Identifier: Apache-2.0
3FROM ubuntu:18.04
4
5ARG KUBECTL=v1.22.1
6ENV PACKAGES \
7 python \
8 python-pip \
9 ssh \
10 openssh-server \
11 curl \
12 supervisor
13ADD requirements.txt /
14
15RUN apt update && \
16 apt install --no-install-recommends -y $PACKAGES && \
17 curl -L "https://dl.k8s.io/release/$KUBECTL/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \
18 chmod 0755 /usr/local/bin/kubectl && \
19 python -m pip install setuptools && \
20 python -m pip install -r requirements.txt && \
21 mkdir -p /var/run/sshd && \
22 mkdir -p /var/log/supervisor && \
23 useradd -m jenkins && \
24 chsh -s /bin/bash jenkins && \
25 echo jenkins:jenkins | chpasswd
26
27ADD docker/fs /
28RUN chown -R jenkins.jenkins /home/jenkins && \
29 python -m pip install -r /tmp/additional-py-pkgs.txt
30
31CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
32
33EXPOSE 22