»Docker

»docker (builder)

Build a Docker image using the docker build protocol.

»Interface

  • Input: component.Source
  • Output: docker.Image

»Variables

»buildkit

If set, use the buildkit builder from Docker.

  • Type: bool
  • Optional

»disable_entrypoint

If set, the entrypoint binary won't be injected into the image.

The entrypoint binary is what provides extended functionality such as logs and exec. If it is not injected at build time the expectation is that the image already contains it.

  • Type: bool
  • Optional

»Examples


build {
  use "docker" {
    buildkit    = false
    disable_entrypoint = false
  }
}

»docker (registry)

Push a Docker image to a Docker compatible registry.

»Interface

  • Input: docker.Image
  • Output: docker.Image

»Variables

»encoded_auth

The authentication information to log into the docker repository.

WARNING: be very careful to not leak the authentication information by hardcoding it here. Use a helper function like file() to read the information from a file not stored in VCS.

  • Type: string
  • Optional

»image

The image to push the local image to, fully qualified.

This value must be the fully qualified name to the image. for example: gcr.io/waypoint-demo/demo.

  • Type: string

»local

If set, the image will only be tagged locally and not pushed to a remote repository.

  • Type: bool
  • Optional

»tag

The tag for the new image.

This is added to image to provide the full image reference.

  • Type: string

»Examples


build {
  use "docker" {}
  registry {
    use "docker" {
      image = "hashicorp/http-echo"
      tag   = "latest"
    }
  }
}

»docker (platform)

Deploy a container to Docker, local or remote.

»Interface

  • Input: docker.Image
  • Output: docker.Deployment

»Variables

»command

The command to run to start the application in the container.

  • Type: string
  • Optional
  • Default: the image entrypoint

»scratch_path

A path within the container to store temporary data.

Docker will mount a tmpfs at this path.

  • Type: string
  • Optional

»service_port

Port that your service is running on in the container.

  • Type: uint
  • Optional
  • Default: 3000

»static_environment

Environment variables to expose to the application.

These environment variables should not be run of the mill configuration variables, use waypoint config for that. These variables are used to control over all container modes, such as configuring it to start a web app vs a background worker.

  • Type: map[string]string
  • Optional

»Examples


deploy {
  use "docker" {
    command      = "ps"
    service_port = 3000
    static_environment = {
      "environment": "production",
      "LOG_LEVEL": "debug"
    }
  }
}