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

Add support for DockerHub auto-builds (fixes #1178) #1181

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

tkw1536
Copy link
Contributor

@tkw1536 tkw1536 commented Aug 4, 2019

I've re-read the DockerHub documentation and figured out that it does support custom build hooks. As such, I have to revise #1178 (comment). With this PR I would like to merge a branch that has auto-builds (i.e. docker image build on every push) enabled. The generated images can be found at tkw01536/latexml.

To speed up the build process I made the following two optimizations:

  • do not include TeXLive (i.e. --build-arg WITH_TEXLIVE=no)
  • do not run perl tests during the build (i.e. installing with cpanm --notest .)

With these optimizations, building seems to take between 10-20 minutes for each commit.

Please note that deploying DockerHub auto-builds for the main LaTeXML repository will require someone with Owner rights on the GitHub repository to configure them.

This commit adds support for automated DockerHub builds in the
Dockerfile. This is composed of three changes 1) Dockerfile and related
files are moved into a dediated directory 2) a DockerHub-dedicated
hooks/build file is added and 3) Testing is disabled in the Dockerfile
to speed up the build.
@brucemiller
Copy link
Owner

Cool! I think -- I'm not sure I understand the implications. Just to make sure: Accepting this PR does not obligate me to do anything with Docker (yet); is that correct?

@dginev
Copy link
Collaborator

dginev commented Sep 6, 2019

@tkw1536 maybe you could enumerate which/if any steps are needed here to enable the auto-builds once the PR is merged? I think it's a pretty safe PR to land in master, even if the configure takes a little bit of time to figure out, nothing existing should be affected.

@brucemiller brucemiller merged commit d320f96 into brucemiller:master Sep 6, 2019
@tkw1536
Copy link
Contributor Author

tkw1536 commented Sep 8, 2019

@brucemiller Correct, yes this PR itself does not obligate you to do anything Docker. The commit mere adds support to do it at all.

@dginev with this PR merged, to enabled DockerHub autobuilds one has to

  1. Create an account on DockerHub and link it to a GitHub account with admin access to this repo. I would recommend using a dedicated bot account for this (see section "Service users for team autobuilds" of the dockerhub autobuild documentation linked below).
  2. Create an automated build and select release/docker/ as the Dockerfile path.
    Then the build hook should take care of everything else and enable auto-magically creating new docker images every push.

@tkw1536 tkw1536 deleted the with-docker-autobuilds branch September 8, 2019 07:09
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