Skip to content

DatasiteLabs/docker-cicd-java

Repository files navigation

docker-cicd-java

Docker GitHub release (latest SemVer)

Toolchain

  • GitHub CLI
  • Java
  • Groovy
  • Gradle
  • Nodejs
  • Python
  • Dumb Init
  • JFrog

Base container / toolchain info

This container is based off of: https://hub.docker.com/_/python and also adds poetry.

List of install resources used:

updating

  1. change the VERSION file text to your target version to avoid clobbering existing versions. see versions

Opening a PR

  • Use a meaningful title, it will be used as the release title
  • Use a meaningful commit message, it will be used as the release message

versions

Manually versioned and latest stored in VERSION file. See https://gradle.org/releases/ for gradle releases. Version should likely match your build.gradle or gradle wrapper settings.

If you need to amend the version in between, use '-blah' or '-fix-blah', the hyphen will break the gradle version from arbitrary information. e.g. -jfrog-1.32.3

Local Testing

To use the build scripts, use docker buildx with multiplatform.

Create a builder

docker buildx create \
  --name container \
  --driver=docker-container

Setup a local registry

./local_registry.sh

Run the scripts

The localdomain can't be localhost, 0.0.0.0, 127.0.0.1 or others on the insecure repository list, port is 5001.

Use: 'host.docker.internal'

Run docker info to see list.

# ./build.sh <platforms> <localdomain:port>
./build.sh linux/arm64 host.docker.internal:5001 # to pass in a local domain, edit hostsfile

If you get http: server gave HTTP response to HTTPS client the easy solution is to run a tool like ngrok ngrok http 5001 and run ./build.sh linux/arm64 <ngrok_https_host>. Replace <ngrok_https_host> with yours ngrok hostname ending in .ngrok-free.app without the protocol.

This will give you an https path locally (and externally, shutdown when done).

Run

# ./run.sh <localdomain:port>
./run.sh host.docker.internal:5001

Test

# ./build.sh <localdomain:port>
./test.sh host.docker.internal:5001

Generating the Test App

cd test
gradle init --type java-application  --dsl groovy

About

docker container for building java projects. includes gradle, jfrog

Resources

License

Stars

Watchers

Forks

Packages

No packages published