| 
1 |  | -ARG ubuntu_version=18.04  | 
2 |  | -FROM ubuntu:$ubuntu_version  | 
 | 1 | +ARG swift_version=5.0  | 
 | 2 | +ARG ubuntu_version=bionic  | 
 | 3 | +FROM swift:$swift_version-$ubuntu_version  | 
3 | 4 | # needed to do again after FROM due to docker limitation  | 
 | 5 | +ARG swift_version  | 
4 | 6 | ARG ubuntu_version  | 
5 | 7 | 
 
  | 
6 |  | -ARG DEBIAN_FRONTEND=noninteractive  | 
7 |  | -# do not start services during installation as this will fail and log a warning / error.  | 
8 |  | -RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d  | 
 | 8 | +# set as UTF-8  | 
 | 9 | +RUN apt-get update && apt-get install -y locales locales-all  | 
 | 10 | +ENV LC_ALL en_US.UTF-8  | 
 | 11 | +ENV LANG en_US.UTF-8  | 
 | 12 | +ENV LANGUAGE en_US.UTF-8  | 
9 | 13 | 
 
  | 
10 |  | -# basic dependencies  | 
11 |  | -RUN apt-get update && apt-get install -y wget git build-essential software-properties-common pkg-config locales  | 
12 |  | -RUN apt-get update && apt-get install -y libicu-dev libblocksruntime0 curl libcurl4-openssl-dev libz-dev  | 
13 |  | - | 
14 |  | -# local  | 
15 |  | -RUN locale-gen en_US.UTF-8  | 
16 |  | -RUN locale-gen en_US en_US.UTF-8  | 
17 |  | -RUN dpkg-reconfigure locales  | 
18 |  | -RUN echo 'export LANG=en_US.UTF-8' >> $HOME/.profile  | 
19 |  | -RUN echo 'export LANGUAGE=en_US:en' >> $HOME/.profile  | 
20 |  | -RUN echo 'export LC_ALL=en_US.UTF-8' >> $HOME/.profile  | 
21 |  | - | 
22 |  | -# known_hosts  | 
23 |  | -RUN mkdir -p $HOME/.ssh  | 
24 |  | -RUN touch $HOME/.ssh/known_hosts  | 
25 |  | -RUN ssh-keyscan github.com 2> /dev/null >> $HOME/.ssh/known_hosts  | 
26 |  | - | 
27 |  | -# clang  | 
28 |  | -RUN apt-get update && apt-get install -y clang-3.9  | 
29 |  | -RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100  | 
30 |  | -RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100  | 
 | 14 | +# dependencies  | 
 | 15 | +RUN apt-get update && apt-get install -y wget  | 
 | 16 | +RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools # used by integration tests  | 
31 | 17 | 
 
  | 
32 | 18 | # ruby and jazzy for docs generation  | 
33 |  | -#ARG skip_ruby_from_ppa  | 
34 |  | -#RUN [ -n "$skip_ruby_from_ppa" ] || apt-add-repository -y ppa:brightbox/ruby-ng  | 
35 |  | -#RUN [ -n "$skip_ruby_from_ppa" ] || { apt-get update && apt-get install -y ruby2.4 ruby2.4-dev; }  | 
36 |  | -#RUN [ -z "$skip_ruby_from_ppa" ] || { apt-get update && apt-get install -y ruby ruby-dev; }  | 
37 |  | -#RUN apt-get update && apt-get install -y libsqlite3-dev  | 
38 | 19 | RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev  | 
39 | 20 | RUN gem install jazzy --no-ri --no-rdoc  | 
40 | 21 | 
 
  | 
41 |  | -# swift  | 
42 |  | -ARG swift_version=4.2.3  | 
43 |  | -ARG swift_flavour=RELEASE  | 
44 |  | -ARG swift_builds_suffix=release  | 
45 |  | - | 
46 |  | -RUN mkdir $HOME/.swift  | 
47 |  | -RUN wget -q "https://swift.org/builds/swift-${swift_version}-${swift_builds_suffix}/ubuntu$(echo $ubuntu_version | sed 's/\.//g')/swift-${swift_version}-${swift_flavour}/swift-${swift_version}-${swift_flavour}-ubuntu${ubuntu_version}.tar.gz" -O $HOME/swift.tar.gz  | 
48 |  | -RUN tar xzf $HOME/swift.tar.gz --directory $HOME/.swift --strip-components=1  | 
49 |  | -RUN echo 'export PATH="$HOME/.swift/usr/bin:$PATH"' >> $HOME/.profile  | 
50 |  | -RUN echo 'export LINUX_SOURCEKIT_LIB_PATH="$HOME/.swift/usr/lib"' >> $HOME/.profile  | 
 | 22 | +# tools  | 
 | 23 | +RUN mkdir -p $HOME/.tools  | 
 | 24 | +RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile  | 
51 | 25 | 
 
  | 
52 | 26 | # script to allow mapping framepointers on linux  | 
53 |  | -RUN mkdir -p $HOME/.scripts  | 
54 |  | -RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.scripts/symbolicate-linux-fatal  | 
55 |  | -RUN chmod 755 $HOME/.scripts/symbolicate-linux-fatal  | 
56 |  | -RUN echo 'export PATH="$HOME/.scripts:$PATH"' >> $HOME/.profile  | 
 | 27 | +RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal  | 
 | 28 | +RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal  | 
0 commit comments