Skip to content

Commit

Permalink
Update docker images with latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
garethjevans committed Jul 23, 2021
1 parent 8571585 commit f6efee4
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 57 deletions.
37 changes: 24 additions & 13 deletions dockerfiles/autoscaler-deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:18.04
MAINTAINER qiye
MAINTAINER autoscaler-team

RUN \
apt-get update && \
Expand All @@ -15,40 +15,51 @@ RUN \
openssl \
unzip \
zip \
iptables \
ruby \
ruby-dev \
python3 \
apt-transport-https \
ca-certificates \
gnupg \
&& \
apt-get clean

# Install go
RUN wget -q https://dl.google.com/go/go1.11.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz && \
rm -rf go1.11.linux-amd64.tar.gz

# Create directory for GOPATH
RUN mkdir -p /go/bin
ENV GO_VERSION 1.15.13
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \
rm -rf go${GO_VERSION}.linux-amd64.tar.gz && \
mkdir -p /go/bin

# set GOPATH
ENV GOPATH /go


# add go and GOPATH/bin to PATH
ENV PATH $PATH:$GOPATH/bin:/usr/local/go/bin

# Install bosh_cli
RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v6.0.0/bosh-cli-6.0.0-linux-amd64 && \
ENV BOSH_VERSION 6.4.4
RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \
mv bosh-cli-* /usr/local/bin/bosh && \
chmod +x /usr/local/bin/bosh
# Install uaac
RUN gem install cf-uaac

# Install jq as a nice to have on container debugging
RUN wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \
ENV JQ_VERSION 1.6
RUN wget -q https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \
mv jq-linux64 /usr/local/bin/jq && \
chmod +x /usr/local/bin/jq

# Install yq
RUN wget -q https://github.com/mikefarah/yq/releases/download/2.1.2/yq_linux_amd64 && \
ENV YQ_VERSION 4.9.6
RUN wget -q https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64 && \
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

# Install gcloud
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && \
apt-get install google-cloud-sdk -y

RUN gcloud version
86 changes: 42 additions & 44 deletions dockerfiles/autoscaler-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,67 +1,65 @@
FROM ubuntu:18.04

MAINTAINER qiye
MAINTAINER autoscaler-team

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"

RUN \
apt-get update && \
apt-get -qqy install --fix-missing \
build-essential \
inetutils-ping \
vim \
curl \
wget \
unzip \
zip \
gcc \
&& \
apt-get clean
# get maven 3.5.4
RUN wget --no-verbose -O /tmp/apache-maven-3.5.4.tar.gz http://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz

# verify checksum
#RUN echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.5.4.tar.gz" | md5sum -c
git \
openjdk-11-jdk \
gnupg \
gnupg2 \
ruby \
ruby-dev

# install maven
RUN tar xzf /tmp/apache-maven-3.5.4.tar.gz -C /opt/
RUN ln -s /opt/apache-maven-3.5.4 /opt/maven
RUN ln -s /opt/maven/bin/mvn /usr/local/bin
RUN rm -f /tmp/apache-maven-3.5.4.tar.gz
ENV MAVEN_HOME /opt/maven
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list

# install openjdk10
#RUN \
# wget -q -O openjdk-10.0.1_linux-x64_bin.tar.gz https://download.java.net/java/GA/jdk10/10.0.1/fb4372174a714e6b8c52526dc134031e/10/openjdk-10.0.1_linux-x64_bin.tar.gz \
# && tar -xvf openjdk-10.0.1_linux-x64_bin.tar.gz \
# && export PATH=$PATH:/jdk-10.0.1/bin \
# && rm -f openjdk-10.0.1_linux-x64_bin.tar.gz \
# && java -version
#ENV PATH /jdk-10.0.1/bin:$PATH
#ENV JAVA_HOME /jdk-10.0.1
RUN apt-get install -y openjdk-8-jdk
ENV POSTGRES_VERSION 10
RUN \
apt-get update && \
apt-get install -y postgresql-${POSTGRES_VERSION} && \
apt-get clean

# install nodejs
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.11.2
RUN wget -q -O node-v8.11.2-linux-x64.tar.gz https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x64.tar.gz
RUN tar -xvf node-v8.11.2-linux-x64.tar.gz
RUN export PATH=$PATH:/node-v8.11.2-linux-x64/bin
ENV PATH /node-v8.11.2-linux-x64/bin:$PATH
RUN rm -f node-v8.11.2-linux-x64.tar.gz
# get maven
ENV MAVEN_VERSION 3.6.3
RUN wget --no-verbose -O /tmp/apache-maven-${MAVEN_VERSION}.tar.gz http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \
tar xzf /tmp/apache-maven-${MAVEN_VERSION}.tar.gz -C /opt/ && \
ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/maven && \
ln -s /opt/maven/bin/mvn /usr/local/bin && \
rm -f /tmp/apache-maven-${MAVEN_VERSION}.tar.gz
ENV MAVEN_HOME /opt/maven

# install golang
ENV GO_VERSION 1.15.13
ENV GOPATH $HOME/go
ENV PATH $HOME/go/bin:/usr/local/go/bin:$PATH
RUN \
wget -q https://dl.google.com/go/go1.11.linux-amd64.tar.gz -P /tmp && \
tar xzvf /tmp/go1.11.linux-amd64.tar.gz -C /usr/local && \
wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -P /tmp && \
tar xzvf /tmp/go${GO_VERSION}.linux-amd64.tar.gz -C /usr/local && \
mkdir $GOPATH && \
rm -rf /tmp/*

# install postgres10
RUN apt-get install -y gnupg gnupg2
ENV PGDATA /var/lib/postgresql/10/main
ENV PGCONFIG /etc/postgresql/10/main
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list
RUN apt-get update \
&& apt-get install -y postgresql-10 \
&& sed -i 's/peer/trust/' ${PGCONFIG}/pg_hba.conf \
&& sed -i 's/md5/trust/' ${PGCONFIG}/pg_hba.conf
# Install bosh_cli
ENV BOSH_VERSION 6.4.4
RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \
mv bosh-cli-* /usr/local/bin/bosh && \
chmod +x /usr/local/bin/bosh
# Install uaac
RUN gem install cf-uaac

# install postgres
ENV PGDATA /var/lib/postgresql/${POSTGRES_VERSION}/main
ENV PGCONFIG /etc/postgresql/${POSTGRES_VERSION}/main
RUN sed -i 's/peer/trust/' ${PGCONFIG}/pg_hba.conf \
&& sed -i 's/md5/trust/' ${PGCONFIG}/pg_hba.conf

0 comments on commit f6efee4

Please sign in to comment.