I'm playing around with HHVM, and I'm running into an issue when trying to run my Dockerized HHVM container: whenever I try to pass CL arguments to HHVM, it fails when used from the Dockerfile CMD, but that very same command works when I add it as an argument on 'docker run'.
Here's my Dockerfile
FROM debian:jessie # install HHVM RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449 && \ echo deb http://dl.hhvm.com/debian jessie main | tee /etc/apt/sources.list.d/hhvm.list && \ apt-get update && \ apt-get -y install hhvm VOLUME ["/var/www/html"] # simply phpinfo(); COPY index.php /var/www/html/index.php EXPOSE 9000 ENTRYPOINT ["hhvm"] CMD ["-m s -v Server.Type=fastcgi -v Server.Port=9000"]
Whenever I try to run this container
docker run -d me/hhvm I get
Error in command line: invalid mode: s -v Server.Type=fastcgi -v Server.Port=9000.
I've also tried the following:
- Without spaces between
Server.x. Same error as above.
--mode server(which is how the official docs say to use) and I get the error
unrecognised [sic] option '--mode server -vSer...etc.
However, with the Dockerfile as configured above, I can run the following command and it works as expected.
docker run -d me/hhvm -m s -v Server.Type=fastcgi -v Server.Port=9000.
No errors, the container is running and accepts connections through port 9000, etc.
So what am I missing?