|
| 1 | +# Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License. |
| 4 | +# A copy of the License is located at |
| 5 | +# |
| 6 | +# http://aws.amazon.com/asl/ |
| 7 | +# |
| 8 | +# or in the "license" file accompanying this file. |
| 9 | +# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. |
| 10 | +# See the License for the specific language governing permissions and limitations under the License. |
| 11 | +# |
| 12 | + |
| 13 | +FROM ubuntu:14.04.5 |
| 14 | + |
| 15 | +ENV DOCKER_BUCKET="download.docker.com" \ |
| 16 | + DOCKER_VERSION="17.09.0-ce" \ |
| 17 | + DOCKER_CHANNEL="stable" \ |
| 18 | + DOCKER_SHA256="a9e90a73c3cdfbf238f148e1ec0eaff5eb181f92f35bdd938fd7dab18e1c4647" \ |
| 19 | + DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \ |
| 20 | + DOCKER_COMPOSE_VERSION="1.21.2" \ |
| 21 | + GITVERSION_VERSION="3.6.5" |
| 22 | + |
| 23 | +# Install git, SSH, and other utilities |
| 24 | +RUN set -ex \ |
| 25 | + && echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression \ |
| 26 | + && apt-get update \ |
| 27 | + && apt-get install software-properties-common -y --no-install-recommends \ |
| 28 | + && apt-add-repository ppa:git-core/ppa \ |
| 29 | + && apt-get update \ |
| 30 | + && apt-get install git=1:2.* -y --no-install-recommends \ |
| 31 | + && git version \ |
| 32 | + && apt-get install -y --no-install-recommends openssh-client=1:6.6* \ |
| 33 | + && mkdir ~/.ssh \ |
| 34 | + && touch ~/.ssh/known_hosts \ |
| 35 | + && ssh-keyscan -t rsa,dsa -H github.com >> ~/.ssh/known_hosts \ |
| 36 | + && ssh-keyscan -t rsa,dsa -H bitbucket.org >> ~/.ssh/known_hosts \ |
| 37 | + && chmod 600 ~/.ssh/known_hosts \ |
| 38 | + && apt-get install -y --no-install-recommends \ |
| 39 | + wget=1.15-* python=2.7.* python2.7-dev=2.7.* fakeroot=1.20-* ca-certificates \ |
| 40 | + tar=1.27.* gzip=1.6-* zip=3.0-* autoconf=2.69-* automake=1:1.14.* \ |
| 41 | + bzip2=1.0.* file=1:5.14-* g++=4:4.8.* gcc=4:4.8.* imagemagick=8:6.7.* \ |
| 42 | + libbz2-dev=1.0.* libc6-dev=2.19-* libcurl4-openssl-dev=7.35.* libdb-dev=1:5.3.* \ |
| 43 | + libevent-dev=2.0.* libffi-dev=3.1~* libgeoip-dev=1.6.* libglib2.0-dev=2.40.* \ |
| 44 | + libjpeg-dev=8c-* libkrb5-dev=1.12+* liblzma-dev=5.1.* \ |
| 45 | + libmagickcore-dev=8:6.7.* libmagickwand-dev=8:6.7.* libmysqlclient-dev=5.5.* \ |
| 46 | + libncurses5-dev=5.9+* libpng12-dev=1.2.* libpq-dev=9.3.* libreadline-dev=6.3-* \ |
| 47 | + libsqlite3-dev=3.8.* libssl-dev=1.0.* libtool=2.4.* libwebp-dev=0.4.* \ |
| 48 | + libxml2-dev=2.9.* libxslt1-dev=1.1.* libyaml-dev=0.1.* make=3.81-* \ |
| 49 | + patch=2.7.* xz-utils=5.1.* zlib1g-dev=1:1.2.* unzip=6.0-* curl=7.35.* \ |
| 50 | + e2fsprogs=1.42.* iptables=1.4.* xfsprogs=3.1.* xz-utils=5.1.* \ |
| 51 | + mono-mcs=3.2.* less=458-* groff=1.22.* liberror-perl=0.17-* \ |
| 52 | + asciidoc=8.6.* build-essential=11.* bzr=2.6.* cvs=2:1.12.* cvsps=2.1-* docbook-xml=4.5-* docbook-xsl=1.78.* dpkg-dev=1.17.* \ |
| 53 | + libdbd-sqlite3-perl=1.40-* libdbi-perl=1.630-* libdpkg-perl=1.17.* libhttp-date-perl=6.02-* \ |
| 54 | + libio-pty-perl=1:1.08-* libserf-1-1=1.3.* libsvn-perl=1.8.* libsvn1=1.8.* libtcl8.6=8.6.* libtimedate-perl=2.3000-* \ |
| 55 | + libunistring0=0.9.* libxml2-utils=2.9.* libyaml-perl=0.84-* python-bzrlib=2.6.* python-configobj=4.7.* \ |
| 56 | + sgml-base=1.26+* sgml-data=2.0.* subversion=1.8.* tcl=8.6.* tcl8.6=8.6.* xml-core=0.13+* xmlto=0.0.* xsltproc=1.1.* \ |
| 57 | + && rm -rf /var/lib/apt/lists/* \ |
| 58 | + && apt-get clean |
| 59 | + |
| 60 | +# Download and set up GitVersion |
| 61 | +RUN set -ex \ |
| 62 | + && wget "https://github.com/GitTools/GitVersion/releases/download/v${GITVERSION_VERSION}/GitVersion_${GITVERSION_VERSION}.zip" -O /tmp/GitVersion_${GITVERSION_VERSION}.zip \ |
| 63 | + && mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \ |
| 64 | + && unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \ |
| 65 | + && rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \ |
| 66 | + && echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \ |
| 67 | + && chmod +x /usr/local/bin/gitversion |
| 68 | + |
| 69 | +# Install Docker |
| 70 | +RUN set -ex \ |
| 71 | + && curl -fSL "https://${DOCKER_BUCKET}/linux/static/${DOCKER_CHANNEL}/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \ |
| 72 | + && echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \ |
| 73 | + && tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \ |
| 74 | + && rm docker.tgz \ |
| 75 | + && docker -v \ |
| 76 | +# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box |
| 77 | + && addgroup dockremap \ |
| 78 | + && useradd -g dockremap dockremap \ |
| 79 | + && echo 'dockremap:165536:65536' >> /etc/subuid \ |
| 80 | + && echo 'dockremap:165536:65536' >> /etc/subgid \ |
| 81 | + && wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \ |
| 82 | + && curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose \ |
| 83 | + && chmod +x /usr/local/bin/dind /usr/local/bin/docker-compose \ |
| 84 | +# Ensure docker-compose works |
| 85 | + && docker-compose version |
| 86 | + |
| 87 | +# Install dependencies by all python images equivalent to buildpack-deps:jessie |
| 88 | +# on the public repos. |
| 89 | + |
| 90 | +RUN set -ex \ |
| 91 | + && wget "https://bootstrap.pypa.io/2.6/get-pip.py" -O /tmp/get-pip.py \ |
| 92 | + && python /tmp/get-pip.py \ |
| 93 | + && pip install awscli==1.* \ |
| 94 | + && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* |
| 95 | + |
| 96 | +VOLUME /var/lib/docker |
| 97 | + |
| 98 | +COPY dockerd-entrypoint.sh /usr/local/bin/ |
| 99 | + |
| 100 | +# Install .NET CLI dependencies |
| 101 | +RUN set -ex \ |
| 102 | + && apt-get update \ |
| 103 | + && apt-get install -y --no-install-recommends \ |
| 104 | + libc6=2.19-* \ |
| 105 | + libcurl3=7.35.* \ |
| 106 | + libgcc1=1:4.9.* \ |
| 107 | + libgssapi-krb5-2=1.12* \ |
| 108 | + libicu52=52.1-* \ |
| 109 | + liblttng-ust0=2.4.* \ |
| 110 | + libssl1.0.0=1.0.* \ |
| 111 | + libunwind8=1.1-* \ |
| 112 | + libuuid1=2.20.* \ |
| 113 | + zlib1g=1:1.2.* \ |
| 114 | + software-properties-common=0.92.* \ |
| 115 | + && add-apt-repository ppa:ubuntu-toolchain-r/test -y \ |
| 116 | + && apt-get update \ |
| 117 | + && apt-get install -y libstdc++6=8*\ |
| 118 | + && rm -rf /var/lib/apt/lists/* |
| 119 | + |
| 120 | +# Install .NET Core SDK |
| 121 | +ENV DOTNET_SDK_VERSION 2.1.300 |
| 122 | +ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz |
| 123 | +ENV DOTNET_SDK_DOWNLOAD_SHA 80a6bfb1db5862804e90f819c1adeebe3d624eae0d6147e5d6694333f0458afd7d34ce73623964752971495a310ff7fcc266030ce5aef82d5de7293d94d13770 |
| 124 | + |
| 125 | +RUN set -ex \ |
| 126 | + && curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \ |
| 127 | + && echo "$DOTNET_SDK_DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - \ |
| 128 | + && mkdir -p /usr/share/dotnet \ |
| 129 | + && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ |
| 130 | + && rm dotnet.tar.gz \ |
| 131 | + && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
| 132 | + |
| 133 | +# Trigger the population of the local package cache |
| 134 | +ENV NUGET_XMLDOC_MODE skip |
| 135 | +RUN set -ex \ |
| 136 | + && mkdir warmup \ |
| 137 | + && cd warmup \ |
| 138 | + && dotnet new \ |
| 139 | + && cd .. \ |
| 140 | + && rm -rf warmup \ |
| 141 | + && rm -rf /tmp/NuGetScratch |
0 commit comments