Migrate CI images to tagged Ubuntu release

Update the CI image process to build from a tagged ubuntu release. All
images now make use of a shared setup script to install the appropriate
binaries.

Closes gh-15158
pull/16246/head
Phillip Webb 6 years ago
parent 8470d649bc
commit 1480dd81eb

@ -0,0 +1,21 @@
== CI Images
These images are used by CI to run the actual builds.
To build the image locally run the following from this directory:
----
$ docker build --no-cache -f <image-folder>/Dockerfile .
----
For example
----
$ docker build --no-cache -f spring-boot-ci-image/Dockerfile .
----
To test run:
----
$ docker run -it --entrypoint /bin/bash <SHA> ✈
----

@ -0,0 +1,56 @@
#!/bin/bash
set -ex
###########################################################
# UTILS
###########################################################
apt-get update
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables jq
rm -rf /var/lib/apt/lists/*
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh > /opt/concourse-java.sh
###########################################################
# JAVA
###########################################################
case "$1" in
java8)
JDK_URL=https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/openjdk-1.8.0_192.tar.gz
;;
java9)
JDK_URL=https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
;;
java10)
JDK_URL=https://download.java.net/java/GA/jdk10/10.0.1/fb4372174a714e6b8c52526dc134031e/10/openjdk-10.0.1_linux-x64_bin.tar.gz
;;
jav11)
JDK_URL=https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/openjdk-11.0.1_13.tar.gz
;;
*)
echo $"Unknown java version"
exit 1
esac
mkdir -p /opt/openjdk
cd /opt/openjdk
curl ${JDK_URL} | tar xz
###########################################################
# DOCKER
###########################################################
cd /
curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz | tar zx
mv /docker/* /bin/
chmod +x /bin/docker*
export ENTRYKIT_VERSION=0.4.0
curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx
chmod +x entrykit && \
mv entrykit /bin/entrykit && \
entrykit --symlink
curl https://raw.githubusercontent.com/concourse/docker-image-resource/v1.0.0/assets/common.sh > /docker-lib.sh

@ -1,34 +1,9 @@
# 1.8.0_181-8u181-b13-1~deb9u1-b13
FROM openjdk@sha256:1b842a215cf3437c9197f0f47e5c1a12f0a27aed27b84536ee3d8ef6b9b7e19e
FROM ubuntu:bionic-20181018
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y libxml2-utils && \
apt-get install -y jq
ADD setup.sh /setup.sh
RUN ./setup.sh java8
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
ENV DOCKER_VERSION=17.05.0-ce \
ENTRYKIT_VERSION=0.4.0
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y libudev1 && \
apt-get install -y iptables && \
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
mv /docker/* /bin/ && chmod +x /bin/docker*
# Install entrykit
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
chmod +x entrykit && \
mv entrykit /bin/entrykit && \
entrykit --symlink
ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ \
"switch", \
"shell=/bin/sh", "--", \
"codep", \
"/bin/docker daemon" \
]
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

@ -1,34 +1,9 @@
# 10.0.2+13-Debian-1
FROM openjdk@sha256:d1bd71b98701c94a7041c328259a8645f02e965b91ead8125d4ca39e068334fb
FROM ubuntu:bionic-20181018
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y libxml2-utils && \
apt-get install -y jq
ADD setup.sh /setup.sh
RUN ./setup.sh java10
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
ENV DOCKER_VERSION=17.05.0-ce \
ENTRYKIT_VERSION=0.4.0
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y libudev1 && \
apt-get install -y iptables && \
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
mv /docker/* /bin/ && chmod +x /bin/docker*
# Install entrykit
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
chmod +x entrykit && \
mv entrykit /bin/entrykit && \
entrykit --symlink
ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ \
"switch", \
"shell=/bin/sh", "--", \
"codep", \
"/bin/docker daemon" \
]
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

@ -1,34 +1,9 @@
# 9.0.4+12-Debian-4
FROM openjdk@sha256:0e48e7e79d9e5637ee5d9c4a4fa2615c7bde69390aab06f7105eb4a8ebec8383
FROM ubuntu:bionic-20181018
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y libxml2-utils && \
apt-get install -y jq
ADD setup.sh /setup.sh
RUN ./setup.sh java9
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
ENV DOCKER_VERSION=17.05.0-ce \
ENTRYKIT_VERSION=0.4.0
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y libudev1 && \
apt-get install -y iptables && \
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
mv /docker/* /bin/ && chmod +x /bin/docker*
# Install entrykit
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
chmod +x entrykit && \
mv entrykit /bin/entrykit && \
entrykit --symlink
ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ \
"switch", \
"shell=/bin/sh", "--", \
"codep", \
"/bin/docker daemon" \
]
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

Loading…
Cancel
Save