GNU Artanis-0.5 is ready for docker

First, you need Docker, I recommend the official installation document.

Then you can pull Artanis image:

docker pull registry.gitlab.com/nalaginrut/artanis:latest

Because the contents created in docker environment is volatile, I'd recommend you create a workspace in the host environment before jump into docker environment.

mkdir myapp

Now you can run a container:

docker run -it --rm -p 3000:3000 -v $PWD/myapp:/ registry.gitlab.com/nalaginrut/artanis:latest bash

I'm going to explain something:


  1. --rm means to remove the container when you exit, this is useful to keep you environment always clean.
  2. -v $PWD/myapp:/ means mapping the inside directory to outside, so that you can keep your work after exit. Please note that docker requires you specify the absolute path.
  3. -p 3000:3000 means mapping inside default port to outside, so that you can see your work outside.
  4. The last option bash means running bash as shell. Unfortunately, our docker image didn't install other shells, so you have to install your favorite shell after you get into the environment.

Now you can create your first Web App with Artanis:

art create hello
cd hello
art draw controller hello world

When everything is prepared, you should do this to boot up Artanis server:

art work -h 0.0.0.0

Because the default host is 127.0.0.1 which is impossible to map the socket port to the outside, so we set the host to 0.0.0.0 to make sure you can checkout your work in the outside browser.

You may want to visit http://localhost:3000/hello/world in your browser.

For more details, please read the manual of GNU Artanis.