9

Quick question and this may be a dumb one. I am attempting to use AWS Code Build with an image I've published to Docker Hub. I selected the option to use a custom image, and the the option to look for the image in another location (an external image repo).

I can't seem to figure out how to reference my image in the appropriate format to use it in the other location field.

Any help would be greatly appreciated.

Below is the field I'm looking to complete:

Jackson
  • 6,391
  • 6
  • 32
  • 43

2 Answers2

7

In the "Other location" text box you can enter the image name from DockerHub. For example, simply give "openjdk" or "openjdk:latest" to use https://hub.docker.com/r/library/openjdk/ as the Docker image for your build. Don't put the "docker pull " prefix for your image name is all.

Note that CodeBuild only supports public Docker images from DockerHub today. Private registries are not supported.

Subin Mathew
  • 2,335
  • 1
  • 16
  • 24
  • 1
    It threw me off since it has a "repository / docker image name" prompt in the field, but it does actually work to just put in something like "node:11" for the node docker image build for version 11. I guess docker hub is the default docker repository. – Greg Apr 18 '19 at 17:21
3

Lets say that you published your image in hub.docker.com, and your repo name is gjackson/myrepo, and you want to grab the image tagged latest, you should populate the other location field with docker.io/gjackson/myrep:latest.

Jamie Starke
  • 8,776
  • 3
  • 38
  • 58