Latest commit 433daa2 Feb 5, 2017 @vietj vietj Releasing 3.4.0-SNAPSHOT
Failed to load latest commit information.
src Merge branch 'master' into replace-docker-maven-plugin Nov 3, 2016 Fix #25 Jun 5, 2015
pom.xml Releasing 3.4.0-SNAPSHOT Feb 5, 2017

Vert.x Stack Docker Images

This project builds the docker images for the Vert.x 3 stack.

Build the images

To build the docker images, just launch:

mvn clean install

Notice that you need to have docker installed on your machine.

Vert.x Stack docker base Image

The built image contains the vertx command in the system path.

Using the base image

The image is intended to be used by extension using the Docker FROM directive. Here is an example:

FROM vertx/vertx3

# Set the location of the verticles
ENV VERTICLE_HOME /usr/verticles

# Set the name of the verticle to deploy
ENV VERTICLE_NAME io.vertx.example.HelloWorldVerticle

# Set vertx option

# The rest of the file should be fine.


# We use the "sh -c" to turn around - variable not expanded
ENTRYPOINT ["sh", "-c"]

Launching the base image

The resulting image is not made to be launched directly (as it contains only vert.x and no applications). If you still want to launch it uses:

docker run -i -t vertx/vertx3

The vert.x files are located in /usr/local/vert.x-3.0.0-SNAPSHOT/.

You can access the vertx command directly using:

docker run -i -t vertx/vertx3 vertx

Vert.x executable image from Docker

A Docker image providing the vertx command

Launching the executable image

Just launch:

docker run -i -t vertx/vertx3-exec

Append the vertx command parameter you need.

for instance:

> docker run -i -t vertx/vertx3-exec -version

If you want to run a verticle:

docker run -i -t -p 8080:8080 \
    -v $PWD:/verticles vertx/vertx3-exec \
    run io.vertx.sample.RandomGeneratorVerticle \
    -cp /verticles/MY_VERTICLE.jar

This command mount the current directory into /verticles and then launch the vertx run command. Notice the -cp parameter reusing the /verticles directory.