From d1049204bc61e18c76b6c207810ef1cacb535065 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 24 Aug 2021 14:04:31 +0000 Subject: [PATCH] added some dockers for building jenkins agents --- docker-jenkins/Dockerfile | 6 ++++++ docker-jenkins/Dockerfile.centos6 | 6 ++++++ docker-jenkins/Makefile | 8 ++++++++ docker-jenkins/build-initial-centos6.sh | 8 ++++++++ docker-jenkins/build-initial.sh | 8 ++++++++ 5 files changed, 36 insertions(+) create mode 100644 docker-jenkins/Dockerfile create mode 100644 docker-jenkins/Dockerfile.centos6 create mode 100644 docker-jenkins/Makefile create mode 100644 docker-jenkins/build-initial-centos6.sh create mode 100644 docker-jenkins/build-initial.sh diff --git a/docker-jenkins/Dockerfile b/docker-jenkins/Dockerfile new file mode 100644 index 0000000..336a8ac --- /dev/null +++ b/docker-jenkins/Dockerfile @@ -0,0 +1,6 @@ +FROM debian:latest + +COPY build-initial.sh /tmp +RUN /tmp/build-initial.sh && rm -rf /tmp/* + +CMD ["/usr/sbin/sshd -D"] diff --git a/docker-jenkins/Dockerfile.centos6 b/docker-jenkins/Dockerfile.centos6 new file mode 100644 index 0000000..bc4b0fe --- /dev/null +++ b/docker-jenkins/Dockerfile.centos6 @@ -0,0 +1,6 @@ +FROM centos:centos6 + +COPY build-initial-centos6.sh /tmp +RUN /tmp/build-initial-centos6.sh && rm -rf /tmp/* + +CMD ["/usr/sbin/sshd -D"] diff --git a/docker-jenkins/Makefile b/docker-jenkins/Makefile new file mode 100644 index 0000000..d1d65f4 --- /dev/null +++ b/docker-jenkins/Makefile @@ -0,0 +1,8 @@ +all: + @echo "Error: Specify the specific target." + +centos6-jenkins: + docker build -t centos6-jenkins -f Dockerfile.centos6 . + +debian-jenkins: + docker build -t debian-jenkins -f Dockerfile . diff --git a/docker-jenkins/build-initial-centos6.sh b/docker-jenkins/build-initial-centos6.sh new file mode 100644 index 0000000..daa8f8e --- /dev/null +++ b/docker-jenkins/build-initial-centos6.sh @@ -0,0 +1,8 @@ +cd /tmp + +apt-get update && +yum install -y + openssh-server openssh-client openjdk-11-jdk openjdk-11-jre \ + gcc gcc-c++ gcc-gnat gcc-java make autoconf automake libtool vim-enhanced && +useradd -m -s /bin/bash jenkins && +mkdir -p /var/run/sshd diff --git a/docker-jenkins/build-initial.sh b/docker-jenkins/build-initial.sh new file mode 100644 index 0000000..d6f0b4f --- /dev/null +++ b/docker-jenkins/build-initial.sh @@ -0,0 +1,8 @@ +cd /tmp + +apt-get update && +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openssh-server openssh-client openjdk-11-jdk openjdk-11-jre \ + gcc make autoconf automake libtool vim && +useradd -m -s /bin/bash jenkins && +mkdir -p /var/run/sshd