Skip to content

t2y/jib-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jib-sample

jib sample code

How to build

To build to a Docker daemon, like this.

$ ./gradlew jibDockerBuild

Confirm the target image was built.

$ docker images | grep jib-sample
ghcr.io/t2y/jib-sample    latest    acf91de5b3f5   52 years ago    151MB

Confirm the docker image information.

$ docker inspect ghcr.io/t2y/jib-sample

How to run

$ docker run --rm ghcr.io/t2y/jib-sample a b c
Hello world
args[0]: a
args[1]: b
args[2]: c

How to publish

To publish to a Github Packages, like this.

$ echo $CR_PAT | docker login ghcr.io -u $USERNAME --password-stdin
$ ./gradlew jib -Djib.container.labels="version.jib-sample=$(git rev-parse HEAD)"

Confirm a docker image has the git revision label.

$ docker pull ghcr.io/t2y/jib-sample:latest
$ docker inspect ghcr.io/t2y/jib-sample:latest | jq '.[].Config.Labels'
{
  "version.jib-sample": "478304ac"
}

About

jib sample code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages