aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirstorli@yahoo.no>2017-08-22 09:43:36 +0200
committerGitHub <noreply@github.com>2017-08-22 09:43:36 +0200
commit726ff8fa6526c08ab528bb2e475aaa1370383046 (patch)
tree905d061aa02550c6056dcd18ee52b96973eea615
parentdc0844dd2b56578757dc021179ea7380cda59f63 (diff)
parent8342ac2132e2077d6ef7c3c4c7afdb060a6aadd8 (diff)
Merge pull request #3169 from vespa-engine/bjorncs/docker-build-cleanup
Bjorncs/docker build cleanup
-rw-r--r--dist/vespa.spec4
-rwxr-xr-xdocker/build-vespa.sh4
-rw-r--r--docker/build/Dockerfile15
-rwxr-xr-xdocker/build/build-vespa-internal.sh1
-rwxr-xr-xdocker/enter-build-container.sh4
5 files changed, 6 insertions, 22 deletions
diff --git a/dist/vespa.spec b/dist/vespa.spec
index dcd31ee55c7..f5fb2c29105 100644
--- a/dist/vespa.spec
+++ b/dist/vespa.spec
@@ -68,8 +68,8 @@ Vespa - The open big data serving engine
%build
source /opt/rh/devtoolset-6/enable || true
-sh bootstrap.sh
-mvn install -DskipTests -Dmaven.javadoc.skip=true
+sh bootstrap.sh java
+mvn -nsu -T %{_smp_mflags} install -DskipTests -Dmaven.javadoc.skip=true
cmake3 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DJAVA_HOME=/usr/lib/jvm/java-openjdk \
-DEXTRA_LINK_DIRECTORY="/usr/lib64/llvm3.9/lib;/opt/vespa-boost/lib;/opt/vespa-libtorrent/lib;/opt/vespa-zookeeper-c-client/lib;/opt/vespa-cppunit/lib" \
diff --git a/docker/build-vespa.sh b/docker/build-vespa.sh
index 37465ecb503..15a0df6a9e9 100755
--- a/docker/build-vespa.sh
+++ b/docker/build-vespa.sh
@@ -11,8 +11,8 @@ DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
cd $DIR
VESPA_VERSION=$1
-DOCKER_IMAGE="vespabuild"
+DOCKER_IMAGE="vespaengine/vespa-dev:latest"
-docker build -t "$DOCKER_IMAGE" -f build/Dockerfile .
+docker pull ${DOCKER_IMAGE}
docker run --rm -v $(pwd)/..:/vespa --entrypoint /vespa/docker/build/build-vespa-internal.sh "$DOCKER_IMAGE" "$VESPA_VERSION" "$(id -u)" "$(id -g)"
diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile
deleted file mode 100644
index ad989969bc5..00000000000
--- a/docker/build/Dockerfile
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-FROM centos:7
-
-# Needed to build vespa
-RUN yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo && \
- yum -y install epel-release && \
- yum -y install centos-release-scl && \
- yum -y install git \
- ccache \
- rpm-build \
- valgrind \
- sudo && \
- echo "source /opt/rh/devtoolset-6/enable" > /etc/profile.d/devtoolset-6.sh && \
- echo "* soft nproc 32768" > /etc/security/limits.d/90-nproc.conf
-
diff --git a/docker/build/build-vespa-internal.sh b/docker/build/build-vespa-internal.sh
index d2216b049ca..9da687a2e00 100755
--- a/docker/build/build-vespa-internal.sh
+++ b/docker/build/build-vespa-internal.sh
@@ -13,7 +13,6 @@ CALLER_GID=$3
cd /vespa
./dist.sh ${VESPA_VERSION}
-yum-builddep -y ~/rpmbuild/SPECS/vespa-${VESPA_VERSION}.spec
rpmbuild -bb ~/rpmbuild/SPECS/vespa-${VESPA_VERSION}.spec
chown ${CALLER_UID}:${CALLER_GID} ~/rpmbuild/RPMS/x86_64/*.rpm
mv ~/rpmbuild/RPMS/x86_64/*.rpm /vespa/docker
diff --git a/docker/enter-build-container.sh b/docker/enter-build-container.sh
index fd433bc19c3..45188cb4df3 100755
--- a/docker/enter-build-container.sh
+++ b/docker/enter-build-container.sh
@@ -10,8 +10,8 @@ fi
DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
cd $DIR
-DOCKER_IMAGE="vespabuild"
+DOCKER_IMAGE="vespaengine/vespa-dev:latest"
-docker build -t "$DOCKER_IMAGE" -f build/Dockerfile .
+docker pull ${DOCKER_IMAGE}
docker run -ti --rm -v $(pwd)/..:/vespa --entrypoint /vespa/docker/build/enter-build-container-internal.sh "$DOCKER_IMAGE"