module QB::Util::DockerMixin

Mixin to help working with Docker.

Constants

DOCKER_TAG_MAX_CHARACTERS

Character limit for Docker image tags.

@return [Fixnum]

DOCKER_TAG_VALID_RE

Regexp to validate strings as Docker tags:

  1. Must start with an ASCII alpha-numeric - `A-Z`, `a-z`, `0-9`.

  2. The rest of the characters can be:

    1. `A-Z`

    2. `a-z`

    3. `_`

    4. `.`

    5. `-`

    Note that it *can not* include `+`, so [Semver][] strings with build info after the `+` are not legal.

  3. Must be {QB::Util::DockerMixin::DOCKER_TAG_MAX_CHARACTERS} in length or less.

[Semver]: semver.org/

@return [Regexp]

Public Class Methods

included(base) click to toggle source
# File lib/qb/util/docker_mixin.rb, line 123
def self.included base
  base.extend ClassMethods
end