summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@yahoo-inc.com>2016-06-22 14:05:05 +0200
committerArnstein Ressem <aressem@yahoo-inc.com>2016-06-22 14:05:05 +0200
commit4987a03e3e69e761153dfe552ecadcf21e49b2f0 (patch)
tree5a3f86477c2856b568e44d6cea9ea4219dc9637d /docker
parent6e89d1bd63edc795fe9d3283e90beb8b676ff90f (diff)
Changes needed to get Vespa up and running in Docker.
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/osx-setup-docker-machine.sh7
-rwxr-xr-xdocker/run-vespa.sh2
2 files changed, 8 insertions, 1 deletions
diff --git a/docker/osx-setup-docker-machine.sh b/docker/osx-setup-docker-machine.sh
index ce27012ab46..f6c9e870cf8 100755
--- a/docker/osx-setup-docker-machine.sh
+++ b/docker/osx-setup-docker-machine.sh
@@ -38,5 +38,12 @@ if [ "$VESPA_VM_STATUS" != "Running" ]; then
exit 1
fi
+if $DOCKER_VM_WAS_STARTED; then
+ # Hostname should match the public IP
+ docker-machine ssh "$DOCKER_VM_NAME" "sudo sed -i \"s/127.0.0.1 $DOCKER_VM_NAME/127.0.0.1/\" /etc/hosts"
+ docker-machine ssh "$DOCKER_VM_NAME" "sudo sed -i \"/$DOCKER_VM_NAME/d\" /etc/hosts"
+ docker-machine ssh "$DOCKER_VM_NAME" "sudo echo $(docker-machine ip $DOCKER_VM_NAME) $DOCKER_VM_NAME | sudo tee -a /etc/hosts" > /dev/null
+fi
+
eval $(docker-machine env "$DOCKER_VM_NAME")
diff --git a/docker/run-vespa.sh b/docker/run-vespa.sh
index 2ff511cc70b..e11324a7b93 100755
--- a/docker/run-vespa.sh
+++ b/docker/run-vespa.sh
@@ -13,5 +13,5 @@ VESPA_VERSION=$1
DOCKER_IMAGE=vesparun
docker build -t "$DOCKER_IMAGE" -f Dockerfile.run .
-docker run -d -v $(pwd)/..:/vespa --entrypoint /vespa/docker/run-vespa-internal.sh "$DOCKER_IMAGE" "$VESPA_VERSION"
+docker run -d -v $(pwd)/..:/vespa --net=host --privileged --entrypoint /vespa/docker/run-vespa-internal.sh "$DOCKER_IMAGE" "$VESPA_VERSION"