Skip to content

Dockerfile for tidy-html5 #255

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

Closed
wants to merge 3 commits into from
Closed

Dockerfile for tidy-html5 #255

wants to merge 3 commits into from

Conversation

vielmetti
Copy link
Contributor

My first pass at a Dockerfile for this project. It downloads the 5.1.9 release, brings in all of the dependencies, builds all of the binaries and libraries, creates documentation, and builds an RPM and DEB for the platform it's on.

A couple of todos are left:

  • it should probably build from the git "master" branch instead of a specific release
  • if you were doing this in production you'd strip a lot of stuff out of it
  • the base image could be much smaller than Ubuntu

This does completely automate a build from scratch.

@geoffmcl
Copy link
Contributor

@vielmett ok, this looks like a script build... No particular problem with that...

Some small points, ideas, comments -

First, as a suggestion! To me a PR should not be for your first pass, plus fixes that you required on testing... It should be the final, tested product, clean of say spelling mistakes... in this case one new file... no history of patches on it before it even arrives...

Others:

  1. MAINTAINER - should this not be the HTACG group? Yes, by all means add something like `

    First added by Edward M. Vielmetti [email protected] on...`

  2. # install prerequisites - well ok, if you really want to mess with someone else system... I'd prefer this 'switchable', at least to be off...
  3. # build everything I possibly can - Hey, WHY? As a user why would you want the documentation, and packaging??? They are of no use to him/her! No gain...

For 2. I do not know if it supports any if-else-endif logic, but my idea would be say in pseudo code -

#IF NOT ENV $DOUPDATE EQU NO
    # Update the system AND prerequisites
    RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    ... etc ...
#ENDIF 

so I can do export DOUPDATE=NO to stop this...

And it would be nice of the list of install items was also externally configerable... and maybe current system dependence, if any needed...

On the latter 3. accepting to not build eveything would certainly reduce the prerequisite system invasion ;=))

To build the default, assuming you have cloned the source, why not just -

# change to the git source
WORKDIR $HOME/projects/tidy-html5/build/cmake
# and build tidy...
RUN ./build-me.sh

And you will note the build-me.sh chooses some defaults but has some user options... one of which is to generate the stripped release, production version...

And I certainly agree with with another of your TODO comments, namely using the git cloned source, or even some other specific branch, other than the default master, like release/5.0.0, or even some earlier tagged versions, not just a fixed zip version...

Otherwise why is git installed? And if not using zip, then no curl install needed...

But either way, this Dockerfile does not really seem to be part of the tidy-html5 source repo...

If you have already cloned the repo to get it, why is it then choosing to download another zip, or another clone, to a WORKDIR /root no less!... Does not really make sense to me...

Maybe this type of thing could be hosted somewhere else as <...>/tidy-html5/Dockerfile... as a sort of do-it-all script... if people want, need that... maybe added to http://www.html-tidy.org/#get_tidy... as an alternative 'full-download-build-install' script...

Or maybe we need another repo, say htacg/meta, which could hold such download-and-compile scripts, and other meta data... I have an updtidy-html5.sh script which does the cloning, but could be expanded... or something...

So, for the reasons above, I personally see no Tidy! gain in this PR at this time... sorry...

Will certainly listens for other comments, ideas...

Maybe I am missing something here? Maybe Dockerfile is the new holy grail ;=))

I do note it is not installed by default in my Ubuntu 14.04!

@vielmetti
Copy link
Contributor Author

Closing this pull request as it was rejected by the package maintainer.

@vielmetti vielmetti closed this Sep 13, 2015
@geoffmcl geoffmcl mentioned this pull request Sep 14, 2015
@geoffmcl geoffmcl mentioned this pull request Apr 4, 2016
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