Convenience Docker Hub Images

While not official releases, the Apache Yetus project makes available two types of images on hub.docker.com:

Both images should be suitable to be used as a building block or even directly if your build environment needs no other dependencies. These images are especially useful for various CI systems that require a Docker image to be used.

Images are tagged such that 'master' represents the last successful Docker image build of the master branch. Images based off of the official source releases are tagged with a matching version number (e.g., 0.9.0). There is no 'latest' tagged image. It is recommended that users choose a stable tag so as not to be surprised by incompatible changes.

File Access

All of the executables that Apache Yetus provides requires access to one or more directories. These directories should be provided on the command line via the volume flags to docker run. For example, to run shelldocs against test-patch.sh:

docker run \
  --rm \
  -v /tmp/out:/output \
  -v /src/precommit/src/main/shell:/input:ro \
  apache/yetus:0.9.0 \
    shelldocs --output /output/test-patch.md --input /input/test-patch.sh

In this example, we mount two volumes: one for input (marked read-only), one for output. After execution, shelldocs has processed test-patch.sh and generated a test-patch.md file in /tmp/out on our local machine.

Precommit also works, assuming that Apache Yetus image has all of your project's dependencies. For example:

docker run \
  --rm \
  -v /tmp/patchdir:/patchdir \
  -v /src:/basedir \
  apache/yetus:0.9.0 \
  qbt \
    --plugins=all \
    --basedir=/basedir \
    --patch-dir=/patchdir \
    --project=yetus

If your project needs additional dependencies, it is trivial to build off of the Apache Yetus image:

FROM apache/yetus:0.9.0
RUN apt-get -q update && apt-get -q install -y \
      clang \
      libssl-dev \
      valgrind \
      zlib1g-dev
docker build -t project/build:0.9.0 -f .

This example builds a docker image based off of Apache Yetus 0.9.0 but with the additions of clang, some development libraries, and valgrind. Now project/build:0.9.0 can be used instead of apache/yetus:0.9.0 since it has all of Apache Yetus and the additions needed by our project.

A Note About Precommit

test-patch and friends have direct support for Docker outside of the convenience images. That information is covered in-depth in theprecommit-docker section.