Building Images

Images are automatically build on Docker Hub.

Docker Cloud and therefore Docker Hub also provides overriding and customization of various commands when building images automatically.

There are some hooks defined in the docker/hooks folder of these images:

  • hooks/build - executed when building image
  • hooks/post_push - executed after building image, used to push additional tags to Docker Hub.

Labels

Labels are neat way to expose additional metadata about particular Docker object. We use Label Schema when defining image labels:

  • build-date - Date and time of the build. Defined as org.label-schema.build-date=$BUILD_DATE, where $BUILD_DATE is set dynamically via above hooks/build script
  • vcs-url - Repository location on GitHub. Defined as org.label-schema.vcs-url="https://github.com/php-earth/docker-php.git"
  • vcs-ref - Reference to commit in Git repository
  • schema-version - Version of the Label Schema in use.
  • vendor - Vendor name of the image creators.
  • name
  • description
  • url


Found a typo? Something wrong with this content?

Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all contributors.