# Jig Google

Automatiza las aplicaciones Java

Guia:

<https://jaxenter.com/jib-java-containerization-146647.html>

**Agregar**

```
 <build>
        <finalName>${project.artifactId}</finalName> 
        <plugins>
            <plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <version>0.9.0</version>
                <configuration>
                    <to>
                        <image>mycompany/${project.artifactId}:${project.version}</image>
                    </to>
                </configuration>
            </plugin>
        </plugins>
    </build>
```

**Arrancar docker**

**Construir la imagen**&#x20;

```
mvn compile jib:build
```

**Construir el demonio en docker**

```
mvn compile jib:dockerBuild
```

**Archivo pom.xml**

```java
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>mydoc</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.15</version>
        </dependency>
    </dependencies> 
    <build>
        <finalName>${project.artifactId}</finalName> 
        <plugins>
            <plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <version>0.9.0</version>
                <configuration>
                    <to>
                        <image>mycompany/${project.artifactId}:${project.version}</image>
                    </to>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avbravo-2.gitbook.io/docker/jig-google.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
