Archives | Categories

A Docker Image for Moochine Demo

Table of Contents

<2014-08-10 Sun>

1 Moochine and Moochine-Demo

Moochine is a simple web framework based on Openresty I created. And moochine-demo( is a simple moochine app to demonstrate how to use the framework. You can also use it as a scratch to start your own moochine app. For the newbies, it seems terrible to setup such a complicated environment, eventually it's not. Anyhow, I created a Docker image with that demo running on for them.

2 The Docker Image

The image is taged with "sid-moochine" on, you can get it easily:

docker pull kdr2/debian:sid-moochine

And then start the demo:

docker run -d -p kdr2/debian:sid-moochine /root/moochine-demo/bin/ -f

The option -f for tells Nginx(openresty) to run at foregroud, so the Docker container will be running on. We also map the port with option -p for Docker, so you can visit http://localhost:9801/ltp on the host OS to see if your demo is running well.

But, there's no database(redis, pgsql, mysql) installed in this image, you should install them yourself if you want to use them. It's simple:

  • run the image and start a shell:

    $ docker run -t -i -p kdr2/debian:sid-moochine /bin/bash
  • install what you want (using aptitude) and start them in that shell;
  • start the demo:

    root@4df89d75e286:/# /root/moochine-demo/bin/

You can also let the demo connect the database on your host OS: just change their server address in the code.

3 Discuss and Comment

comments powered by Disqus


Built with Emacs (Org mode 8.3.5).

Last updated: 2016-08-18 Thu 14:04.

Green Web Hosting! This site hosted by DreamHost.