-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 HHVM image #1043
Add HHVM image #1043
Conversation
Image can be pull at |
@baptistedonaux I'm curious why you didn't use the prebuilt
I did a POC I expect that building it from source will result in a smaller image due to leaving out some of the "nice things" they mention that aren't really needed in a Docker image, but I'm curious what else it leaves out and whether it's worth the maintenance burden. |
Hi @md5 ! I know the Dockerfile recommendations and these recommendations are really good. But I really reflected on the method to use. I made the choice to build HHVM and not use pre build debian package because, in my case I like use a specific version of HHVM. Whereas HHVM repository gives only the LTS versions (3.3, 3.6, 3.9) and latest stable. With this build, the user can choice the version. Your feedback is really important for me because, this solution can be good (but the implementation can be improved), or it's a bad solution and my problem concerns only me. Thank you for your contribution. |
That makes sense. I thought that more versions were available since they're available in the Now that I look at the actual In terms of maintaining the official images themselves, I don't know that there's a need to have every minor version available since not all of those versions will be supported tags. I do think there's value in having a |
I work on new integration which will use pre build packages that you have found in the official repository. |
@baptistedonaux I wasn't necessarily suggesting using those packages, just pointing out that I had seen that they're there. Since they aren't listed in |
Since upstream's official documentation suggests using the packages, I
think we would be remiss not to:
https://github.com/facebook/hhvm/wiki/Prebuilt-Packages-for-HHVM
I'm also not terribly concerned about older versions -- having a quality
Dockerization of what upstream supports would be my first priority,
followed secondarily by hacking together something to backfill older tags
(perhaps just by downloading those ".deb" files directly).
|
@tianon 👍 |
I understand that the community prefers using pre-build package because the official documentation recommends it. So, I propose you, an other version to build/use hhvm with specific version (not latest which use It's an solution not entirely pleasing but really simple to maintain. https://github.com/baptistedonaux/docker-images/blob/hhvm/hhvm/3.9/Dockerfile |
@baptistedonaux I can't speak for @tianon, but I think this comment indicates a preference for packages. I would tend to agree in terms of maintaining an |
To be perfectly clear, what I'd like to see in the ideal case (since the packages are built, maintained, and recommended directly by upstream), is something like the following. For latest: FROM debian:jessie
# pub 2048R/1BE7A449 2013-12-25
# Key fingerprint = 36AE F64D 0207 E7EE E352 D487 5A16 E728 1BE7 A449
# uid Paul Tarjan <[email protected]>
# sub 2048R/452A652F 2013-12-25
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 36AEF64D0207E7EEE352D4875A16E7281BE7A449
RUN echo 'deb http://dl.hhvm.com/debian jessie main' > /etc/apt/sources.list.d/hhvm.list
# could also be: (but not sure if this will hold for future releases based on their LTS status)
#RUN echo 'deb http://dl.hhvm.com/debian jessie-lts-3.9 main' > /etc/apt/sources.list.d/hhvm.list
ENV HHVM_VERSION 3.9.1~jessie
RUN apt-get update && apt-get install -y --no-install-recommends \
hhvm=$HHVM_VERSION \
&& rm -rf /var/lib/apt/lists/* For older versions (like the 3.6 series, which is also LTS): FROM debian:jessie
# pub 2048R/1BE7A449 2013-12-25
# Key fingerprint = 36AE F64D 0207 E7EE E352 D487 5A16 E728 1BE7 A449
# uid Paul Tarjan <[email protected]>
# sub 2048R/452A652F 2013-12-25
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 36AEF64D0207E7EEE352D4875A16E7281BE7A449
RUN echo 'deb http://dl.hhvm.com/debian jessie-lts-3.6 main' > /etc/apt/sources.list.d/hhvm.list
ENV HHVM_VERSION 3.6.6~jessie
RUN apt-get update && apt-get install -y --no-install-recommends \
hhvm=$HHVM_VERSION \
&& rm -rf /var/lib/apt/lists/* |
LGTM Looks like it would be a good idea to add |
Actually, I noticed that you're using |
Great ! I take notes and I come back with required scripts. |
@baptistedonaux The The entrypoint changes would be needed to pass the |
Looks really good! 👍 Build test of #1043; 9d4d069 ( $ url="https://raw.githubusercontent.com/docker-library/official-images/9d4d069a279a9dc077f90bd70f7494bdaf0fb23d/library/hhvm"
$ bashbrew build "$url"
Cloning hhvm (git://github.com/baptistedonaux/docker-images) ...
Processing hhvm:3.3 ...
Processing hhvm:3.3.7 ...
Processing hhvm:3.6 ...
Processing hhvm:3.6.6 ...
Processing hhvm:3.9 ...
Processing hhvm:3.9.1 ...
Processing hhvm:3 ...
Processing hhvm:3.10 ...
Processing hhvm:3.10.0 ...
Processing hhvm:latest ...
$ bashbrew list --uniq "$url" | xargs test/run.sh
testing hhvm:3.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...failed
testing hhvm:3.6
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...failed
testing hhvm:3.9
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...failed
testing hhvm:3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...failed The only thing left that I can see is the |
Travis fixed ! |
I'm still not understanding why we're setting an entrypoint. What about users who don't want to use fastcgi? What about users who don't want a web server at all? I could understand something like what we've got for As an additional thought, has upstream been contacted to see if they're interested in being involved? |
@tianon It seems to me that having this parallel the |
Yeah, although in this case it's going to just be a modified default
command, right?
|
I think so, though perhaps something comparable to php-fpm.conf is possible
and could be useful.
|
@md5 It's exactly that. HHVM can be use like FastCGI server and/or CLI mode. In the first proposition, I added I transformed entrypoint and command in only entrypoint but it's mistake of me. I remove now ENTRYPOINT and set HHVM server command in CMD. |
Done !
With these changements, |
Thanks @baptistedonaux! 👍 I've opened a small PR that adds back a simple This will allow things like One more thing I might suggest is that having this in its own |
…onaux/docker-hhvm
@md5 PR accepted and links updated to baptistedonaux/docker-hhvm repository. |
This is looking great. A few more points:
|
Execution right fixed on master/entrypoint.sh. |
Images tested. Entrypoint works in CLI and FastCGI modes. All these changements have added errors. I hope this is fixed now.
|
@baptistedonaux Nothing comes to mind. Thanks for working on this! 👍 |
ping @tianon |
With regards to reaching out to upstream, @yosifkit opened an issue with them that's currently getting some decent discussion: hhvm/packaging#138 |
I'm really sorry to make you go through all this work 😞. It seems upstream would rather that it come from them, hhvm/packaging#138 (comment). Thanks anyway for contributing. |
@yosifkit Thank you for your feedback. I'm really sad that this work can't be use like official image and help the community. I hope that Facebook will propose a good image now that they want to recover the baby. Thank you @yosifkit @tianon and @md5 for the help given. My image stays available if it can help anyone. |
I'm going to go ahead and close this - if anything changes with upstream such that this image would be the most appropriate official image candidate for hhvm, we can reopen. |
The PR documentation is here docker-library/docs#339