Skip to content

Instantly share code, notes, and snippets.

@enriclluelles
Created December 4, 2015 00:27
Show Gist options
  • Save enriclluelles/5cb17a4e13848979c184 to your computer and use it in GitHub Desktop.
Save enriclluelles/5cb17a4e13848979c184 to your computer and use it in GitHub Desktop.
docker build -t compile_swift . && docker run --rm -ti -v $PWD:/app compile_swift
#!/bin/bash
cd $1
git clone https://github.com/apple/swift.git swift
git clone https://github.com/apple/swift-llvm.git llvm
git clone https://github.com/apple/swift-clang.git clang
git clone https://github.com/apple/swift-lldb.git lldb
git clone https://github.com/apple/swift-cmark.git cmark
git clone https://github.com/apple/swift-llbuild.git llbuild
git clone https://github.com/apple/swift-package-manager.git swiftpm
git clone https://github.com/apple/swift-corelibs-xctest.git
git clone https://github.com/apple/swift-corelibs-foundation.git
cd swift && ./utils/build-script
FROM ubuntu:trusty
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install git cmake ninja-build clang uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config
RUN sudo apt-get -y install clang-3.6
RUN sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.6 100
RUN sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.6 100
ADD build.sh /
RUN chmod a+x /build.sh
VOLUME /app
WORKDIR /app
ENTRYPOINT /build.sh /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment