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

Improve docker setup #81

Merged
merged 3 commits into from
Feb 25, 2019
Merged

Improve docker setup #81

merged 3 commits into from
Feb 25, 2019

Conversation

gfrey
Copy link
Contributor

@gfrey gfrey commented Feb 24, 2019

Three fixes to the docker setup:

  • Migrate from alpine to debian based container to mitigate issues with iconv.
  • Optimize Dockerfile to better use caching for installation of dependencies, to reduce build time.
  • Improve documentation, to mention fix for file ownership.

This is related to issues with iconv on alpine linux (see [1]). I
noticed that the content file `tipuesearch_content.json` didn't contain
the sanitized text, but only the boolean `false`. I tracked it down to
the `iconv` call. After migration to the debian docker image it is
working fine. Build was started using `docker run --rm -it -w /build -v
"$PWD":/build daux/daux.io daux generate`.

[1] docker-library/php#428
This change will only copy the `compose.{json|lock}` files prior to
installing the dependencies. This improves container image build time
when only code changed, as it facilitates image caching.
Using the user's uid and gid in the container prevents the output files
to belong to root.
@onigoetz
Copy link
Contributor

Hello,
thanks for those changes.

Funny because the move to alpine was a recommendation in #5
If there is an issue with the Alpine image I'm fine reverting to Debian

@onigoetz onigoetz merged commit 5f61678 into dauxio:master Feb 25, 2019
@gfrey
Copy link
Contributor Author

gfrey commented Mar 2, 2019

Thanks for maintaining the project!

I didn't hesitate to change the base image under the assumption, that the docker container is mostly used to confine the PHP setup and easily generate the static pages. If people use the container to generate pages on the fly on the internet, this choice might be a bad one.

@onigoetz
Copy link
Contributor

onigoetz commented Mar 2, 2019

You’re welcome.
Your assumptions are correct, it’s even mentionned in the documentation that we don’t recommend directly serving pages :)

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.

2 participants