centos6 docker image builder for jenkins
This commit is contained in:
parent
d1049204bc
commit
a96035d094
@ -1,6 +1,7 @@
|
|||||||
FROM centos:centos6
|
FROM centos:centos6
|
||||||
|
|
||||||
COPY build-initial-centos6.sh /tmp
|
COPY build-initial-centos6.sh /tmp
|
||||||
|
COPY centos6-eol.repo /etc/yum.repos.d/
|
||||||
RUN /tmp/build-initial-centos6.sh && rm -rf /tmp/*
|
RUN /tmp/build-initial-centos6.sh && rm -rf /tmp/*
|
||||||
|
|
||||||
CMD ["/usr/sbin/sshd -D"]
|
CMD ["/usr/sbin/sshd -D"]
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
cd /tmp
|
cd /tmp
|
||||||
|
|
||||||
apt-get update &&
|
rm -f /etc/yum.repos.d/CentOS-*.repo &&
|
||||||
yum install -y
|
yum -y update &&
|
||||||
openssh-server openssh-client openjdk-11-jdk openjdk-11-jre \
|
yum -y install \
|
||||||
|
openssh-server openssh-clients java-1.8.0-openjdk java-1.8.0-openjdk-devel \
|
||||||
gcc gcc-c++ gcc-gnat gcc-java make autoconf automake libtool vim-enhanced &&
|
gcc gcc-c++ gcc-gnat gcc-java make autoconf automake libtool vim-enhanced &&
|
||||||
useradd -m -s /bin/bash jenkins &&
|
useradd -m -s /bin/bash jenkins &&
|
||||||
|
sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd &&
|
||||||
|
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key &&
|
||||||
|
RUN ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key &&
|
||||||
mkdir -p /var/run/sshd
|
mkdir -p /var/run/sshd
|
||||||
|
40
docker-jenkins/centos6-eol.repo
Normal file
40
docker-jenkins/centos6-eol.repo
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
[C6.10-base]
|
||||||
|
name=CentOS-6.10 - Base
|
||||||
|
baseurl=http://vault.centos.org/6.10/os/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-updates]
|
||||||
|
name=CentOS-6.10 - Updates
|
||||||
|
baseurl=http://vault.centos.org/6.10/updates/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-extras]
|
||||||
|
name=CentOS-6.10 - Extras
|
||||||
|
baseurl=http://vault.centos.org/6.10/extras/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-contrib]
|
||||||
|
name=CentOS-6.10 - Contrib
|
||||||
|
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=0
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-centosplus]
|
||||||
|
name=CentOS-6.10 - CentOSPlus
|
||||||
|
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=0
|
||||||
|
metadata_expire=never
|
||||||
|
|
4
docker-jenkins/readme.txt
Normal file
4
docker-jenkins/readme.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
docker run -d -p 9922:22 --name=debian-jenkins-agent --restart=unless-stopped debian-jenkins:latest /usr/sbin/sshd -D
|
||||||
|
|
||||||
|
docker run -d -p 9923:22 --name=centos6-jenkins-agent --restart=unless-stopped centos6-jenkins:latest /usr/sbin/sshd -D
|
||||||
|
|
Loading…
Reference in New Issue
Block a user