Dockerfile provided by MP
MP should provide a Dockerfile that should result in a container which bundles the tools developed by the MP along with all requirements.
Based on ocrd:core
Docker containers should be based on the ocrd base
image which itself is based on Ubuntu
18.04. For one, this allows MP to use the
ocrd tool to handle recurrent tasks
in a spec-conformant way. Besides, it locally installed and containerized
Image tags MUST be the same as the project name but with underscore (
replaced with forward slash (
|project name||docker tag|
The Dockerfile MUST accept build args
VCS_REF contains the short id of the latest commit this image was built upon.
BUILD_DATE contains an ISO-8601 date.
From these build args, the image shall be labelled with this command:
LABEL \ maintainer="https://github.com/YOUR/PROJECT/issues" \ org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-url="https://github.com/YOUR/PROJECT" \ org.label-schema.build-date=$BUILD_DATE
org.label-schema.cvs-url shall point to the issues and
landing page of the GitHub project resp.
CMD should be provided.
ENTRYPOINT should be provided.
ENTRYPOINT are provided, they should be empty arrays.
/data as volume
/data in the the container should be marked as a volume to
allow processing host data in the container in a uniform way.
FROM ocrd:core VOLUME ["/data"] ARG VCS_REF ARG BUILD_DATE LABEL \ maintainer="https://github.com/bar/ocrd_foo/issues" \ org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-url="https://github.com/bar/ocrd_foo" \ org.label-schema.build-date=$BUILD_DATE # RUN-commands to install requirements, build and install # e.g. # apt-get install -y curl ENTRYPOINT 
Command to build docker image
docker build \ -t 'ocrd/foo' \ --build-arg VCS_REF=$(git rev-parse --short HEAD) \ --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")