Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ MAINTAINER Haris Amin <[email protected]>
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

ENV SWIFT_VERSION 2.2-SNAPSHOT-2015-12-01-b
ENV SWIFT_PLATFORM ubuntu14.04

RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y build-essential wget clang libedit-dev python2.7 python2.7-dev libicu52 rsync && \
Expand All @@ -13,17 +16,17 @@ RUN wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
RUN gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift

# Download Swift Ubuntu 14.04 Snapshot, signature and verify
RUN wget https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz
RUN wget https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz.sig
RUN gpg --verify swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz.sig
RUN wget https://swift.org/builds/ubuntu1404/swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz
RUN wget https://swift.org/builds/ubuntu1404/swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz.sig
RUN gpg --verify swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz.sig

RUN tar -xvzf swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz && cd swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04
RUN tar -xvzf swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz && cd swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM

# Move extracted Swift Snapshot
RUN rsync -a -v --ignore-existing swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/ /usr
RUN rsync -a -v --ignore-existing swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM/usr/ /usr

# Clean up
RUN cd / && rm -rf swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04*
RUN cd / && rm -rf swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM*

# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down