Merge branch 'leipert-thinner-images' into 'master'

Thin out docker images

See merge request gitlab-org/gitlab-build-images!120
This commit is contained in:
Stan Hu 2018-10-05 00:14:09 +00:00
commit 1f333ac062
19 changed files with 107 additions and 63 deletions

View file

@ -1,5 +1,4 @@
FROM alpine:latest
RUN apk --no-cache add py-pip
RUN pip install awscli
RUN apk --no-cache add py-pip \
&& pip install --no-cache-dir awscli

View file

@ -6,6 +6,8 @@ ADD /scripts/ /scripts/
RUN apt-get update \
&& apt-get install -y git \
&& /scripts/install-node 8.x 1.2.1-1 \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/* \
&& gem install danger-gitlab --no-document \
&& git version \

View file

@ -1,8 +1,12 @@
FROM node:10-jessie
# Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
RUN apt-get update && apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*

View file

@ -2,6 +2,8 @@ FROM ubuntu:18.04
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make curl zlib1g-dev libssl1.0-dev locales \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -13,9 +15,10 @@ ENV LC_ALL en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -1,9 +1,10 @@
FROM centos:centos6
RUN yum update -y -q
RUN yum groupinstall -y Development Tools
RUN yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel
RUN yum update -y -q \
&& yum groupinstall -y Development Tools \
&& yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel \
&& yum clean all
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
@ -12,9 +13,10 @@ RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -1,9 +1,10 @@
FROM centos:centos7
RUN yum update -y -q
RUN yum groupinstall -y Development Tools
RUN yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel
RUN yum update -y -q \
&& yum groupinstall -y Development Tools \
&& yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel \
&& yum clean all
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
@ -12,9 +13,10 @@ RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -2,6 +2,8 @@ FROM debian:jessie
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make curl zlib1g-dev libssl-dev locales\
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -13,9 +15,10 @@ ENV LC_ALL en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -1,9 +1,10 @@
FROM opensuse:42.3
RUN zypper -q -n --gpg-auto-import-keys update
RUN zypper -q -n in -t pattern devel_perl devel_basis
RUN zypper -q -n install \
gcc gcc-c++ git make curl zlib-devel libopenssl-devel glibc-i18ndata glibc-locale
RUN zypper -q -n --gpg-auto-import-keys update \
&& zypper -q -n in -t pattern devel_perl devel_basis \
&& zypper -q -n install \
gcc gcc-c++ git make curl zlib-devel libopenssl-devel glibc-i18ndata glibc-locale \
&& zypper clean -a
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
@ -13,9 +14,10 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -2,6 +2,8 @@ FROM debian:stretch
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make curl zlib1g-dev libssl1.0-dev locales \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -14,9 +16,10 @@ ENV LC_ALL en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -2,14 +2,17 @@ FROM ubuntu:14.04
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make curl zlib1g-dev libssl-dev \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -2,6 +2,8 @@ FROM debian:wheezy
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make libc6-dev curl zlib1g-dev libssl-dev locales \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -13,9 +15,10 @@ ENV LC_ALL en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -2,6 +2,8 @@ FROM ubuntu:16.04
RUN apt-get update -q \
&& apt-get install -y g++ gcc git make curl zlib1g-dev libssl-dev locales \
&& apt-get autoremove -yq \
&& apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -13,9 +15,10 @@ ENV LC_ALL en_US.UTF-8
ENV RUBY_VERSION 2.4.4
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd /tmp/ruby-2.4.4 \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install
RUN gem install bundler --no-document
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document

View file

@ -1,6 +1,6 @@
FROM ruby:2.4-alpine
RUN apk add --update build-base cmake git openssh-client
RUN apk add --update --no-cache build-base cmake git openssh-client
# Set UTF-8 http://jaredmarkell.com/docker-and-locales/
ENV LANG en_US.UTF-8

View file

@ -6,7 +6,10 @@ ANSIBLE_VERSION=$1
apt-get update
apt-get install -y python-pip python-dev
apt-get clean -yqq
pip install --upgrade cffi
pip install "ansible==${ANSIBLE_VERSION}"
pip install --no-cache-dir --upgrade cffi
pip install --no-cache-dir "ansible==${ANSIBLE_VERSION}"
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*

View file

@ -35,3 +35,7 @@ rm -rf /var/lib/apt/lists/*
wget -q https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip
unzip chromedriver_linux64.zip -d /usr/local/bin
rm -f chromedriver_linux64.zip
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*

View file

@ -16,8 +16,6 @@ apt-get install -y \
libkrb5-dev postgresql-client mysql-client unzip \
libre2-dev gettext \
apt-get clean -yqq
# Set UTF-8
# http://stackoverflow.com/a/3182519/2137281
LOC=$'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8'
@ -28,4 +26,6 @@ locale-gen
dpkg-reconfigure locales -f noninteractive -p critical
locale -a
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*

View file

@ -15,3 +15,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis
apt-get update
apt-get install -y nodejs yarn=$YARN_INSTALL_VERSION
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*

View file

@ -10,4 +10,7 @@ echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg ${POSTGRES_VERSIO
apt-get update
apt-get install -y postgresql-client
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*

View file

@ -11,7 +11,6 @@ apt-get install -yq --no-install-recommends \
git-core pandoc texlive-latex-recommended texlive-xetex \
texlive-fonts-recommended lmodern ed file curl gnupg2
apt-get autoremove -yq
# Set UTF-8
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@ -19,4 +18,6 @@ locale-gen
update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_ALL=en_US.UTF-8
locale -a
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*