If Bigloo is to be downloaded from local host.
hop -p 8888
Then
$ (cd docker; docker build -t hop .)
$ docker image save -o "/tmp/hop-docker-image-`date '+%d%b%y'`-`(git rev-parse --short HEAD)`.tgz" hop
$ docker export -o "/tmp/hop-docker-`date '+%d%b%y'`-`(git rev-parse --short HEAD)`.tgz" jsrecords
It might be needed to first remove an existing Hop image with:
$ docker images
to get the Hop docker , and then:
$ docker rmi <image-id>
It might be needed to kill running processes in that image first:
$ docker ps -a
$ docker rm <container-id>
or
$ docker container prune
The Hop web site contains a pre-built docker image. To import it, use the following:
$ docker load < hop-docker-image-4may2018.tgz
$ docker import hop-docker-4may2018.tgz -- hop
$ docker run -d -p 8080:8080 -v /tmp/hopdocker:/hoproot hop /hoproot/app.js --libs-dir /hoproot/libs
$ docker run -a STDIN -a STDERR -a STDOUT --tty -p 8080:8080 -v /tmp/hopdocker:/hoproot hop /hoproot/app.js --libs-dir /hoproot/libs
$ docker run -t -i --entrypoint=/bin/bash -v /tmp/hopdocker:/hoproot hop
Run a Hop container image and execute:
$ docker cp hop:/usr/local/share/doc/hop/3.2.0 .
Run a Hop container image and execute:
$ docker cp hop:/tmp/hop/3.2.0/docker/hop.docker .
$ mkdir -p $HOME/.config/hop
$ cat > $HOME/.config/hop/hoprc.js << EOF
hop = require( "hop" );
var user = require( hop.user );
user.add( { name: "anonymous", services: "*", directories: "*" } );
EOF
$ cat > /tmp/hello.js << EOF
console.log( "Hello World!" );
service hello() {
return <html>Hello World!</html>'
}
EOF
$ hop.docker /tmp/hello.js
$ firefox http://localhost:8080/hop/hello
$ mkdir /tmp/hopdocker
$ cp -r examples /tmp/hopdocker
$ docker run -d -p 8080:8080 -v /tmp/hopdocker:/hoproot hop /hoproot/examples/examples/examples.js --libs-dir /hoproot/libs
Run the Hop docker and browse the documentation located in the file:
/usr/local/share/doc/hop/3.2.0/index.html
Example:
$ hop.docker -p 9999
$ firefox http://localhost:9999/usr/local/share/doc/hop/3.2.0/index.html
The HipHop documentation is located at:
/usr/local/share/doc/hiphop/index.html
Note: On Windows, localhost
might not be bound to the docker
instance network interface. In that case, one should use the IP
address generated by the Docker daemon when it starts.