Version control with Docker

Docker is a software containerization platform that enables you to introduce a lightweight layer of abstraction of operating-system-level virtualization. Docker isolates features of Linux to allow independent containers to run within a single Linux instance. A container image is a stand-alone and executable package that consists of code, runtime, system tools, system libraries and settings.

Helix TeamHub provides the Docker Registry so that you can store and distribute Docker images within your organization.

The following resources may help you learn Docker:

Setting up

  1. Download and install the latest version of the Docker client.
  2. Open your terminal and run the following command to log in to start communicating with the Helix TeamHub Docker Registry:

    docker login helixteamhub.cloud

    Your username consists of 2 parts: the username and the company short name from TeamHub. These parts must be concatenated by the + sign. For example: admin+hth

  3. Use the TeamHub UI to create a repo. This is required to be able to push images.
  4. When you have a repo, tag your image with its address.

    To tag a new build, run:

    docker build -t helixteamhub.cloud/<COMPANY-SHORT-NAME>/projects/<PROJECT-NAME>/repositories/docker/<REPOSITORY-NAME>

    If your image already exists, tag it by running:

    docker tag <IMAGE> helixteamhub.cloud/<COMPANY-SHORT-NAME>/projects/<PROJECT-NAME>/repositories/docker/<REPOSITORY-NAME>

    By default, your images are tagged as latest.

    Remember, you can use as many tags as you need, as follows:

    docker tag <IMAGE> helixteamhub.cloud/<COMPANY-SHORT-NAME>/projects/<PROJECT-NAME>/repositories/docker/<REPOSITORY-NAME>:<TAG-NAME>
  5. To push your image to the Helix TeamHub Docker Registry, run:

    docker push helixteamhub.cloud/<COMPANY-SHORT-NAME>/projects/<PROJECT-NAME>/repositories/docker/<REPOSITORY-NAME>
  6. To pull an image (only available for authorized users), run:

    docker pull helixteamhub.cloud/<COMPANY-SHORT-NAME>/projects/<PROJECT-NAME>/repositories/docker/<REPOSITORY-NAME>