aboutsummaryrefslogtreecommitdiffstats
path: root/docker/run
diff options
context:
space:
mode:
authorgjoranv <gv@yahoo-inc.com>2017-06-27 14:29:23 +0200
committergjoranv <gv@yahoo-inc.com>2017-06-27 14:29:23 +0200
commit295b1b55af1179babd5a4fafedc8a494ec23b671 (patch)
tree5db0da58424536de8973ca8d9cde580354e5acb2 /docker/run
parent37e072c994b3788d1fb3df92b98064508b548e20 (diff)
Move Dockerfile.run and run-vespa-internal.sh to new run/ folder.
Diffstat (limited to 'docker/run')
-rw-r--r--docker/run/Dockerfile15
-rwxr-xr-xdocker/run/run-vespa-internal.sh26
2 files changed, 41 insertions, 0 deletions
diff --git a/docker/run/Dockerfile b/docker/run/Dockerfile
new file mode 100644
index 00000000000..4116b12a00d
--- /dev/null
+++ b/docker/run/Dockerfile
@@ -0,0 +1,15 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+FROM centos:7
+ARG VESPA_VERSION
+
+# Needed to run 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
+
+COPY vespa*-${VESPA_VERSION}-*.rpm /tmp/
+RUN yum localinstall -y $(ls /tmp/vespa*-${VESPA_VERSION}-*.rpm | xargs)
+
+ENV VESPA_HOME=/opt/vespa
+ENV PATH="${PATH}:${VESPA_HOME}/bin"
+
diff --git a/docker/run/run-vespa-internal.sh b/docker/run/run-vespa-internal.sh
new file mode 100755
index 00000000000..e8c8c0d4d0e
--- /dev/null
+++ b/docker/run/run-vespa-internal.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+if [ $# -ne 0 ]; then
+ echo "Usage: $0"
+ echo "This script should not be called manually."
+ exit 1
+fi
+
+DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
+cd $DIR
+
+# Workaround until we figure out why rpm does not set the ownership.
+chown -R vespa:vespa /opt/vespa
+
+export VESPA_CONFIG_SERVERS=$(hostname)
+
+/opt/vespa/bin/vespa-start-configserver
+/opt/vespa/bin/vespa-start-services
+
+# Print log forever
+while true; do
+ /opt/vespa/bin/logfmt -f /opt/vespa/logs/vespa/vespa.log
+ sleep 10
+done