Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (25 sloc) 1.11 KB
FROM ubuntu:14.04
MAINTAINER saulius@necolt.com
ENV SWIFT_BRANCH development
ENV SWIFT_VERSION DEVELOPMENT-SNAPSHOT-2016-02-08-a
ENV SWIFT_PLATFORM ubuntu14.04
RUN apt-get update && \
apt-get install -y build-essential wget clang libedit-dev python2.7 python2.7-dev libicu52 rsync libxml2 git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - && \
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
RUN SWIFT_ARCHIVE_NAME=swift-$SWIFT_VERSION-$SWIFT_PLATFORM && \
SWIFT_URL=https://swift.org/builds/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" | tr -d .)/swift-$SWIFT_VERSION/$SWIFT_ARCHIVE_NAME.tar.gz && \
wget $SWIFT_URL && \
wget $SWIFT_URL.sig && \
gpg --verify $SWIFT_ARCHIVE_NAME.tar.gz.sig && \
tar -xvzf $SWIFT_ARCHIVE_NAME.tar.gz --directory / --strip-components=1 && \
rm -rf $SWIFT_ARCHIVE_NAME* /tmp/* /var/tmp/*
ENV PATH /usr/bin:$PATH
RUN mkdir -p /swifton
WORKDIR /swifton
ADD . /swifton
RUN swift build --configuration release
EXPOSE 8000
CMD .build/release/Swifton-TodoApp