Spin up an java development environment Codespace with gradle and Jib to build faster containerized java applications.
- Creating codespace from this template
- Creating codespace from blank template
- Click on
Use Template
- Make changes according to your requirements
- Run the default setup and push image to image registry with
gradle jib \ -Djib.to.image=myregistry/myimage:latest \ -Djib.to.auth.username=$USERNAME \ -Djib.to.auth.password=$PASSWORD
- Push your changes to your repo
-
Navigate to your github home page and select
Codespaces
from the menu -
Under
Explore quick start templates
selectUse this template
for blank template. This will open a codespace with almost all development tools installed. -
To costomize your env press
CTRL+SHIFT+P
and typeConfigure Dev container
and select very first result -
Now the options will appear to modify your existing confire or create from scratch. Select
Start from scratch
-
Now on new prompt select
All definitions
then typejava
, select first item in appeared list and then version of jdk -
In the next prompt check the gradle options and CLick
Ok
two times. -
Now you have a enviroment ready with the gradle and java installed with jib-gradle-plugin to build containerized image