TL; DR:
What are the minimum requirements in “Automated builds” to get an “[OK]” status in the “AUTOMATED” section of the docker search results?
TS; DR:
- “Set up Automated builds” @
docs.docker.com
I read the docs above to automate the building and the results at the Docker Hub’s repo gave me “SUCCESS”. Though, I’m having trouble getting the “AUTOMATED” as “[OK]” in docker search results.
To isolate the problem I made a simple hello-world repo but I still can’t get the “[OK]”.
The “Autobuild” is enabled in it’s “Configure Automated Builds” settings. And when pushed to the GitHub repo, the automated build of DockerHub runs and gives me success. So the “Autobuild” seems to be working but doesn’t take effect on docker search results.
Here’s the step that I took:
-
Create a sample repo on GitHub. (
https://github.com/KEINOS/hello_dockerhub/) -
Create a simple shell script which only echoes “Hello Docker Hub!”. (
src/say_hello.sh) -
Create a simple shell script to test the above script. (
src/check_health.sh) - Create a Dockerfile with health check of the above test.
-
Do
docker build .andrunlocally to see if it works -> OK -
Create a test file for Docker Hub. (
/docker-compose.test.yml) - Create a repo on Docker Hub and link it to GitHub’s repo above.
-
Edit something and
git push originthen the repo incloud.docker.comreacts to build. - Wait until the “Build Status” becomes “SUCCESS”.
- Check if the test was running during the build -> OK
- Pull the built image from docker cloud and run locally -> OK
-
Do
docker search <myname>/<myrepo>-> NG (No [OK] in AUTOMATED)
The “Configure Automated Builds” settings are below:
Build configurations
- SOURCE REPOSITORY:
KEINOS/hello_dockerhub@ GitHub - BUILD LOCATION:
Build on Docker Hub's infrastructure - AUTOTEST:
Internal Pull Requests - REPOSITORY LINKS:
Enable for Base Image - BUILD RULES:
Source Type Source Docker Tag Dockerfile location Build Context Autobuild Build Caching BranchmasterlatestDockefile/Enabled Enabled Tag/^v([0-9.]+)$/v{\1}Dockefile/Enabled Enabled
Build triggers
- none
Deploy Key
- ssh-RSA key
Related topics:
Target repo
- GitHub: https://github.com/KEINOS/hello_dockerhub/
- Docker Hub: https://hub.docker.com/r/keinos/hello_dockerhub
- BitBucket: https://bitbucket.org/KEINOS/hello_dockerhub/
- Docker Hub: https://hub.docker.com/r/keinos/hello_dockerhub2
Env info of host:
- macOS Mojave (OSX 10.14.4)
$ docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false