Github Package Registry
go docker
Published: 2019-10-12

Code and Docker images in one place

GitHub launched a package registry service, so let’s give it a go. I’ll use the echo server to go through the steps below.

Refer to Go in Docker for creating a docker image.

Sign up for GitHub Package Registry HERE. Then create an authentication token and use it as your password for the Docker login command

https://github.com/features/package-registry

Add registry to Docker

docker login docker.pkg.github.com --username $GIT_USER

docker build -t $GIT_USER/echo/linux-amd64:1.0.0 .
docker tag $GIT_USER/echo/linux-amd64 docker.pkg.github.com/$GIT_USER/echo/linux-amd64:1.0.0
docker push docker.pkg.github.com/$GIT_USER/echo/linux-amd64:1.0.0

Run your newly built and published image with:

docker run -d -p 8888:8888 docker.pkg.github.com/$GIT_USER/echo/linux-amd64:1.0.0 -listen ":8888"