DEV Community

D
D

Posted on

2

Docker で Hack

Facebook Hack試してみた。(Hello Worldだけ)
https://github.com/facebook/hhvm/wiki#installing-pre-built-packages-for-hhvm
自前のサーバーは汚したくないんで、Dockerでやってみた。

$ vim Dockerfile
Enter fullscreen mode Exit fullscreen mode
FROM ubuntu

RUN apt-get update
RUN apt-get install -y python-software-properties
RUN apt-get install -y wget
RUN add-apt-repository ppa:mapnik/boost
RUN wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
RUN echo deb http://dl.hhvm.com/ubuntu precise main | sudo tee /etc/apt/sources.list.d/hhvm.list
RUN apt-get update
RUN apt-get install -y hhvm
Enter fullscreen mode Exit fullscreen mode
$ docker build -t hack .
.....
$ docker images

$ docker run -i -t hack bash
root@c5b48b4e3988:/# vi helloworld.hh
Enter fullscreen mode Exit fullscreen mode
<?hh
  echo "Hello World\n";
Enter fullscreen mode Exit fullscreen mode
root@c5b48b4e3988:/# hhvm helloworld.hh
Hello World
root@c5b48b4e3988:/# 
Enter fullscreen mode Exit fullscreen mode

ハマったところ!

<?hh
  echo "Hello World\n";
?>
Enter fullscreen mode Exit fullscreen mode

HipHop Fatal error: syntax error, unexpected T_HH_ERROR, expecting $end in /hellworld.hh on line 2

?> 閉じカッコを書くと上のエラーが出る

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay