DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

D
D

Posted on

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

?> ้–‰ใ˜ใ‚ซใƒƒใ‚ณใ‚’ๆ›ธใใจไธŠใฎใ‚จใƒฉใƒผใŒๅ‡บใ‚‹

Top comments (1)

๐Ÿ—ฃ Want to join the conversation?

ย 
It's easy! Become a DEV member to follow this post, comment, and more.