Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for 0.10.0 #1147

Merged
merged 21 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions jib-gradle-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Field | Type | Default | Description
`to` | [`to`](#to-closure) | *Required* | Configures the target image to build your application to.
`from` | [`from`](#from-closure) | See [`from`](#from-closure) | Configures the base image to build your application on top of.
`container` | [`container`](#container-closure) | See [`container`](#container-closure) | Configures the container that is run from your built image.
`extraDirectory` | [`extraDirectory`](#extradirectory-closure) / `File` | See `extraDirectory` | Configures the directory used to add arbitrary files to the image.
`extraDirectory` | [`extraDirectory`](#extradirectory-closure) / `File` | `(project-dir)/src/main/jib` | Configures the directory used to add arbitrary files to the image.
`allowInsecureRegistries` | `boolean` | `false` | If set to true, Jib ignores HTTPS certificate errors and may fall back to HTTP as a last resort. Leaving this parameter set to `false` is strongly recommended, since HTTP communication is unencrypted and visible to others on the network, and insecure HTTPS is no better than plain HTTP. [If accessing a registry with a self-signed certificate, adding the certificate to your Java runtime's trusted keys](https://github.com/GoogleContainerTools/jib/tree/master/docs/self_sign_cert.md) may be an alternative to enabling this option.
`useProjectOnlyCache` | `boolean` | `false` | If set to `true`, Jib does not share a cache between different Maven projects.

Expand Down Expand Up @@ -257,27 +257,26 @@ jib {

You can add arbitrary, non-classpath files to the image by placing them in a `src/main/jib` directory. This will copy all files within the `jib` folder to the image's root directory, maintaining the same structure (e.g. if you have a text file at `src/main/jib/dir/hello.txt`, then your image will contain `/dir/hello.txt` after being built with Jib).

You can configure a different directory by using the `extraDirectory` parameter in your `build.gradle`, either by using the `jib.extraDirectory.path` parameter:

```groovy
// Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib'
jib.extraDirectory.path = file('src/main/custom-extra-dir')
```

or by setting the path on the `extraDirectory` parameter directly:

You can configure a different directory by using the `jib.extraDirectory` parameter in your `build.gradle`:
```groovy
// Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib'
jib.extraDirectory = file('src/main/custom-extra-dir')
jib {
TadCordle marked this conversation as resolved.
Show resolved Hide resolved
// Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib'
jib.extraDirectory = file('src/main/custom-extra-dir')
}
```

The `extraDirectory` parameter can also be used to set the file permissions of files added to the container by specifying the absolute path of the file on the container as well as the octal representation of its file permission bits in the `jib.extraDirectory.permissions` field:
Alternatively, the `jib.extraDirectory` parameter can be used as a closure to set a custom extra directory, as well as the extra files' permissions on the container:

```groovy
jib.extraDirectory.permissions = [
'/path/on/container/to/fileA': '755', // Read/write/execute for owner, read/execute for group/other
'/path/to/another/file': '644' // Read/write for owner, read-only for group/other
]
jib {
extraDirectory {
path = file('src/main/custom-extra-dir') // Copies files from 'src/main/custom-extra-dir'
permissions = [
'/path/on/container/to/fileA': '755', // Read/write/execute for owner, read/execute for group/other
'/path/to/another/file': '644' // Read/write for owner, read-only for group/other
]
}
}
```

### Authentication Methods
Expand Down
49 changes: 22 additions & 27 deletions jib-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Field | Type | Default | Description
`to` | [`to`](#to-object) | *Required* | Configures the target image to build your application to.
`from` | [`from`](#from-object) | See [`from`](#from-object) | Configures the base image to build your application on top of.
`container` | [`container`](#container-object) | See [`container`](#container-object) | Configures the container that is run from your image.
`extraDirectory` | [`extraDirectory`](#extradirectory-object) / string | See `extraDirectory` | Configures the directory used to add arbitrary files to the image.
`extraDirectory` | [`extraDirectory`](#extradirectory-object) / string | `(project-dir)/src/main/jib` | Configures the directory used to add arbitrary files to the image.
`allowInsecureRegistries` | boolean | `false` | If set to true, Jib ignores HTTPS certificate errors and may fall back to HTTP as a last resort. Leaving this parameter set to `false` is strongly recommended, since HTTP communication is unencrypted and visible to others on the network, and insecure HTTPS is no better than plain HTTP. [If accessing a registry with a self-signed certificate, adding the certificate to your Java runtime's trusted keys](https://github.com/GoogleContainerTools/jib/tree/master/docs/self_sign_cert.md) may be an alternative to enabling this option.
`skip` | boolean | `false` | If set to true, Jib execution is skipped (useful for multi-module projects). This can also be specified via the `-Djib.skip` command line option.
`useOnlyProjectCache` | boolean | `false` | If set to true, Jib does not share a cache between different Maven projects.
Expand Down Expand Up @@ -315,37 +315,32 @@ In this configuration, the image:

You can add arbitrary, non-classpath files to the image by placing them in a `src/main/jib` directory. This will copy all files within the `jib` folder to the image's root directory, maintaining the same structure (e.g. if you have a text file at `src/main/jib/dir/hello.txt`, then your image will contain `/dir/hello.txt` after being built with Jib).

You can configure a different directory by using the `extraDirectory` parameter in your `pom.xml`, either by using the `<extraDirectory><path>` parameter:

```xml
<!-- Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib' -->
<extraDirectory>
<path>${project.basedir}/src/main/custom-extra-dir</path>
</extraDirectory>
```

or by setting the path on the `extraDirectory` parameter directly:

You can configure a different directory by using the `<extraDirectory>` parameter in your `pom.xml`:
```xml
<!-- Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib' -->
<extraDirectory>${project.basedir}/src/main/custom-extra-dir</extraDirectory>
<configuration>
<!-- Copies files from 'src/main/custom-extra-dir' instead of 'src/main/jib' -->
<extraDirectory>${project.basedir}/src/main/custom-extra-dir</extraDirectory>
</configuration>
```

The `extraDirectory` parameter can also be used to set the file permissions of files added to the container by specifying the absolute path of the file on the container as well as the octal representation of its file permission bits in the `<extraDirectory><permissions>` field:
Alternatively, the `<extraDirectory>` parameter can be used as an object to set a custom extra directory, as well as the extra files' permissions on the container:

```xml
<extraDirectory>
<permissions>
<permission>
<file>/path/on/container/to/fileA</file>
<mode>755</mode> <!-- Read/write/execute for owner, read/execute for group/other -->
</permission>
<permission>
<file>/path/to/another/file</file>
<mode>644</mode> <!-- Read/write for owner, read-only for group/other -->
</permission>
</permissions>
</extraDirectory>
<configuration>
<extraDirectory>
<path>${project.basedir}/src/main/custom-extra-dir</path> <!-- Copies files from 'src/main/custom-extra-dir' -->
<permissions>
<permission>
<file>/path/on/container/to/fileA</file>
<mode>755</mode> <!-- Read/write/execute for owner, read/execute for group/other -->
</permission>
<permission>
<file>/path/to/another/file</file>
<mode>644</mode> <!-- Read/write for owner, read-only for group/other -->
</permission>
</permissions>
</extraDirectory>
</configuration>
```

### Authentication Methods
Expand Down