Expand the Root Disk on a dch-photon Docker Engine

Depending on how many images you are planning to build in a dch-photon Docker Engine instance, you might need a larger root disk than the default of 2GB.

To create a larger root disk, use the docker volume create command to create a disk of the desired size and then mount it to the dch-photon container VM by using the -v option.

Prerequisites

  • You have access to a virtual container host (VCH) that the vSphere administrator configured so that it can connect to the registry to pull the dch-photon image. The VCH must also have a volume store named default. For information about how deploy a VCH that is suitable for use with dch-photon, see the Deploy a Virtual Container Host with a Volume Store and vSphere Integrated Containers Registry Access in vSphere Integrated Containers for vSphere Administrators.
  • You have an instance of Docker Engine running on your local sytem.
  • For simplicity, this example uses a VCH that was deployed with the --no-tlsverify option. If your VCH implements TLS verification of clients, you must import the VCH certificates into your Docker client and adapt the Docker commands accordingly. For information about how to connect a Docker client to a VCH that uses full TLS authentication, see Connecting to the VCH.

Procedure

  1. Log in to vSphere Integrated Containers Registry from your VCH.
    docker -H vch_address:2376 --tls login registry_address
  2. Pull the dch-photon image into the image cache in your local Docker client.
    docker  -H vch_address:2376 --tls pull registry_address/default-project/dch-photon:17.06
  3. Create a volume of the desired size in your VCH.
    docker -H vch_address:2376 --tls volume create --opt Capacity=30GB --name mydchdisk
  4. Run the dch-photon container VM in the VCH, behind a port mapping.
    docker -H vch_address:2376 --tls run --name DCH -d -v mydchdisk:/var/lib/docker -p 12375:2376 registry_address/default-project/dch-photon:17.06
  5. Run docker info on the newly deployed docker host.
    docker -H vch_address:12375 info

results matching ""

    No results matching ""