Skip to content

Commit d5b5928

Browse files
committed
Support to build on ubuntu 14.04
1 parent 10f2a05 commit d5b5928

File tree

2 files changed

+56
-4
lines changed

2 files changed

+56
-4
lines changed

Dockerfile-swift-dev-14.04

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM ubuntu:14.04
2+
MAINTAINER Norio Nomura <[email protected]>
3+
4+
# Install Dependencies
5+
6+
RUN apt-get update && \
7+
apt-get install -y \
8+
autoconf \
9+
build-essential \
10+
clang-3.5 \
11+
git \
12+
icu-devtools \
13+
libblocksruntime-dev \
14+
libbsd-dev \
15+
libedit-dev \
16+
libicu-dev \
17+
libkqueue-dev \
18+
libncurses5-dev \
19+
libpython-dev \
20+
libsqlite3-dev \
21+
libtool \
22+
libxml2-dev \
23+
ninja-build \
24+
pkg-config \
25+
python \
26+
swig \
27+
systemtap-sdt-dev \
28+
uuid-dev \
29+
wget \
30+
&& \
31+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.5 100 && \
32+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.5 100 && \
33+
apt-get clean && \
34+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
35+
36+
# Build and Install CMake
37+
RUN export CMAKE_VERSION="3.6.1" && \
38+
wget https://cmake.org/files/v3.6/cmake-${CMAKE_VERSION}.tar.gz && \
39+
tar zxf cmake-${CMAKE_VERSION}.tar.gz && \
40+
cd cmake-${CMAKE_VERSION} && \
41+
./configure && \
42+
make && \
43+
make install && \
44+
cd .. && \
45+
rm -rf cmake-${CMAKE_VERSION}

build-sourcekit-sv.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ cd "$(dirname $0)/." || exit
44

55
# docker-machine start default && eval $(docker-machine env default)
66

7-
BUILD_BASE_IMAGE="swift-dev-15.10"
7+
UBUNTU_VERSION="${1:-14.04}"
8+
BUILD_BASE_IMAGE="swift-dev:${UBUNTU_VERSION}"
9+
BUILD_BASE_IMAGE_DOCKERFILE="Dockerfile-swift-dev-${UBUNTU_VERSION}"
10+
if [ ! -f "${BUILD_BASE_IMAGE_DOCKERFILE}" ]; then
11+
echo "${BUILD_BASE_IMAGE_DOCKERFILE} does not exist!"
12+
exit 1
13+
fi
814

915
# swift build environments
10-
docker build -f Dockerfile-${BUILD_BASE_IMAGE} -t ${BUILD_BASE_IMAGE} .
16+
docker build -f ${BUILD_BASE_IMAGE_DOCKERFILE} -t ${BUILD_BASE_IMAGE} . || exit 1
1117

1218
WORK_DIR="`pwd`"
1319
DOCKER_RUN_OPTIONS="-it -v ${WORK_DIR}:${WORK_DIR} -w ${WORK_DIR} --rm"
@@ -41,8 +47,9 @@ fi
4147

4248
if [ -z "`docker images -q ${SOURCEKIT_IMAGE}|tr -d '\n'`" ]; then
4349
# Build ${BASE_IMAGE}
44-
BASE_IMAGE="swift-base-15.10"
45-
docker build -f sourcekit-builder/Dockerfile-swift-15.10 -t ${BASE_IMAGE} . || exit 1
50+
BASE_IMAGE="swift-base:${UBUNTU_VERSION}"
51+
BASE_IMAGE_DOCKERFILE="sourcekit-builder/Dockerfile-swift-${UBUNTU_VERSION}"
52+
docker build -f ${BASE_IMAGE_DOCKERFILE} -t ${BASE_IMAGE} . || exit 1
4653

4754
# Build ${SOURCEKIT_IMAGE}
4855
DOCKER_BUILD_DIR="${TMPDIR}$(basename $0)"

0 commit comments

Comments
 (0)