Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Use Debian Stretch instead of Alpine Linux as base OS image #24

Merged
merged 1 commit into from
May 24, 2018

Conversation

lower29
Copy link
Contributor

@lower29 lower29 commented May 22, 2018

This pull request changes our NextCloud image to use Debian Stretch as its base OS rather than Alpine Linux.

The main reason for this change is that Alpine has a known bug in its DNS resolution that prevents non-qualified host names from being resolved properly. This prevents our NextCloud image from being able to resolve external database servers, amongst other things.

Our previous base image was actually a bundle of Alpine with Nginx and PHP installed, so the changes here include additional steps to install and configure these base components, which we now have to do ourselves.

This addresses RDSSARK-527.

This addresses a DNS bug in Alpine that prevents name resolution working
unless the search domain is specified explicitly (which is almost never
done).

Also updated NextCloud from v12.0.6 to v12.0.7.
@@ -1 +1 @@
sudo -u nextcloud php -d memory_limit=<MEMORY_LIMIT> -f /nextcloud/occ "$@"
sudo -E -u nextcloud php -d memory_limit=<MEMORY_LIMIT> -f /nextcloud/occ "$@"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extra -E parameter is so that the environment gets passed to the command too, so that occ can access vars like DB_HOST etc so it can operate correctly.

@@ -53,7 +53,7 @@ cat > /nextcloud/config/autoconfig.php <<EOF;
'dbport' => '${DB_PORT}',
'dbtableprefix' => 'oc_',
EOF
if [[ ! -z "$ADMIN_USER" ]]; then
if [ ! -z "$ADMIN_USER" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing [[ to [ fixes the broken syntax for /bin/sh - only /bin/bash supports [[ (was previously masked by /bin/sh being alias for /bin/bash).

@sevein sevein self-requested a review May 23, 2018 09:36
Copy link

@sevein sevein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working for me. I've built the Docker image and verified that the Compose env starts properly.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants