Coder Social home page Coder Social logo

quarkus-jib-plugin's Introduction

quarkus-jib-plugin

Configuration

Plugin can be configured in build.gradle and settings.gradle. Variable quarkusJibPluginVersion should be configured in build.properties.

build.gradle:

plugins {
    id 'java'
    id 'io.quarkus'
    id 'de.ungerts.quarkus-jib'
}

apply plugin: 'io.quarkus'
apply plugin: 'de.ungerts.quarkus-jib'

quarkusJib {
    offlineMode = false
    from {
        baseImage = 'gcr.io/distroless/java:11'
    }
    to {
        imageName = "${project.name}"
    }
}

settings.gradle:

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.namespace == 'de.ungerts' && requested.id.name == 'quarkus-jib') {
                useModule("de.ungerts:quarkus-jib-plugin:${quarkusJibPluginVersion}")
            }
        }
    }
    repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()
    }
    plugins {
        id 'io.quarkus' version "${quarkusPluginVersion}"
    }
}

rootProject.name='quarkus-jib-example'

Parameters:

Parameter Default Description
libsDirPath "${project.buildDir}${File.separator}lib"
applicationLayersCachePath "${project.buildDir}${File.separator}jib-app-cache"
baseImageLayersCachePath "${project.buildDir}${File.separator}jib-base-cache"
from Closure
to Closure
exposedPort 8080
offlineMode false
tarFileName 'runner-image.tar'
allowInsecureRegistries false

To Specification:

Parameter Default Description
imageName 'runner-image'
credentialHelper

From Specification:

Parameter Default Description
baseImage 'gcr.io/distroless/java:11'
credentialHelper

Example

Requirements

JAVA_HOME must to point to a JDK 11.

Run example

Check out the repo and install the plugin by executing Gradle in the projects' root directory.

On Windows:

gradlew install

On Linux/Mac:

./gradlew install

Change directory to examples/quarkus-jib.

Build container image and write the image to a tar file.

On Windows:

gradlew jibImageTar

On Linux/Mac:

./gradlew jibImageTar

Tar file should be available at build/quarkus-jib.tar.

Build container image and write the image to local Docker repository.

On Windows:

gradlew jibDockerBuild

On Linux/Mac:

./gradlew jibDockerBuild

Image quarkus-jib should be installed to local Docker repository.

List images (Linux/Mac/Windows):

docker image ls

Run image quarkus-jib (Linux/Mac/Windows):

docker run -ti --rm -p 8080:8080 quarkus-jib

quarkus-jib-plugin's People

Contributors

dwu avatar ungerts avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.