From 7bcd0c16c024a73535579db9914fc74d32729081 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 17 Mar 2022 10:51:34 +0100 Subject: [PATCH] add docs for macOS and improve docker testing Signed-off-by: szaimen --- Containers/mastercontainer/start.sh | 8 ++++---- readme.md | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index b3a80093..aed61814 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -43,7 +43,7 @@ elif ! sudo -u www-data test -r /var/run/docker.sock; then fi # Check if api version is supported -if ! docker info &>/dev/null; then +if ! sudo -u www-data docker info &>/dev/null; then echo "Cannot connect to the docker socket. Cannot proceed." exit 1 fi @@ -51,7 +51,7 @@ API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)" API_VERSION="$(grep -oP 'const API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)" # shellcheck disable=SC2001 API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')" -LOCAL_API_VERSION_NUMB="$(docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')" +LOCAL_API_VERSION_NUMB="$(sudo -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')" if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then echo "Docker v$API_VERSION is not supported by your docker engine. Cannot proceed." @@ -63,10 +63,10 @@ else fi # Check if startup command was executed correctly -if ! docker ps | grep -q "nextcloud-aio-mastercontainer"; then +if ! sudo -u www-data docker ps | grep -q "nextcloud-aio-mastercontainer"; then echo "It seems like you did not give the mastercontainer the correct name?" exit 1 -elif ! docker volume ls | grep -q "nextcloud_aio_mastercontainer"; then +elif ! sudo -u www-data docker volume ls | grep -q "nextcloud_aio_mastercontainer"; then echo "It seems like you did not give the mastercontainer volume the correct name?" exit 1 fi diff --git a/readme.md b/readme.md index cc2424fe..f0d0dd3c 100644 --- a/readme.md +++ b/readme.md @@ -78,6 +78,9 @@ Nextcloud AIO is inspired by projects like Portainer that allow to manage the do ### Are reverse proxies supported? Yes. Please refer to the following documentation on this: [reverse-proxy.md](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md) +### How to run it on macOS? +On macOS, there is one specialty in comparison to linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /var/run/docker.sock.raw:/var/run/docker.sock:ro`. Apart from that it should work and behave the same like on linux. + ### Which ports are mandatory to be open? Only those (if you acces the Mastercontainer Interface internally via port 8080): - `443/TCP` for the Apache container