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 and FAQ for #1818, #1814, and #1888 #1866

Merged
merged 26 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
28ebafd
Update README and FAQ
chanseokoh Jul 23, 2019
3252aa7
Update
chanseokoh Jul 23, 2019
303cecb
Update jib-gradle-plugin/README.md
chanseokoh Jul 23, 2019
4a5bd1f
Update jib-gradle-plugin/README.md
chanseokoh Jul 23, 2019
6ea439c
Update jib-gradle-plugin/README.md
chanseokoh Jul 23, 2019
9909f9e
Update jib-maven-plugin/README.md
chanseokoh Jul 23, 2019
a33222b
Update README.md
chanseokoh Jul 23, 2019
13b3623
Update faq.md
chanseokoh Jul 24, 2019
2951262
Update README.md
chanseokoh Jul 24, 2019
e5d0d17
Update README.md
chanseokoh Jul 24, 2019
7810243
Update README.md
chanseokoh Jul 24, 2019
e5c10e7
Update jib-maven-plugin/README.md
chanseokoh Jul 25, 2019
a6d074d
Update jib-gradle-plugin/README.md
chanseokoh Jul 25, 2019
a451c8f
Update jib-maven-plugin/README.md
chanseokoh Jul 25, 2019
b2f75ce
Update jib-gradle-plugin/README.md
chanseokoh Jul 25, 2019
09d2cfc
README about jib.alwaysCacheBaseImage
chanseokoh Jul 30, 2019
ad03793
Remove system property from READMEs
chanseokoh Jul 30, 2019
4f9e459
Use openjdk8 on Travis instead of oraclejdk8
chanseokoh Jul 30, 2019
0a5ffa6
minor fixes
chanseokoh Jul 30, 2019
21d734e
Ubuntu Trusty
chanseokoh Jul 30, 2019
ded043a
comments
chanseokoh Jul 30, 2019
a6cc9a4
`<filesModificationTime>`
chanseokoh Jul 30, 2019
753c5b4
Merge branch 'travis-openjdk8' into i1864-README
chanseokoh Jul 30, 2019
b2b3d34
Merge branch 'master' into i1864-README
chanseokoh Jul 30, 2019
ed623af
Add creationTime, remove useCurrentTimestamp
TadCordle Aug 9, 2019
635d383
Promote fixed timestamp over USE_CURRENT_TIMESTAMP
TadCordle Aug 9, 2019
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
2 changes: 2 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ jib.container.useCurrentTimestamp = true
</p>
</details>

Note that the modification time of the files in the built image put by Jib will still be 1 second past the epoch. The file modification time can be configured using [`<container><filesModificationTime>`](../jib-maven-plugin#container-object) (Maven) or [`container.filesModificationTime`](../jib-gradle-plugin#container-closure) (Gradle).
chanseokoh marked this conversation as resolved.
Show resolved Hide resolved

#### Please tell me more about reproducibility!

_Reproducible_ means that given the same inputs, a build should produce the same outputs. Container images are uniquely identified by a digest (or a hash) of the image contents and image metadata. Tools and infrastructure such the Docker daemon, Docker Hub, registries, Kubernetes, etc) treat images with different digests as being different.
Expand Down
4 changes: 3 additions & 1 deletion jib-gradle-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,13 @@ Property | Type | Default | Description
`entrypoint` | `List<String>` | *None* | The command to start the container with (similar to Docker's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) instruction). If set, then `jvmFlags` and `mainClass` are ignored. You may also set `jib.container.entrypoint = 'INHERIT'` to indicate that the `entrypoint` and `args` should be inherited from the base image.\*
`environment` | `Map<String, String>` | *None* | Key-value pairs for setting environment variables on the container (similar to Docker's [ENV](https://docs.docker.com/engine/reference/builder/#env) instruction).
`extraClasspath` | `List<String>` | *None* | Additional paths in the container to prepend to the computed Java classpath.
`filesModificationTime` | `String` | `EPOCH_PLUS_SECOND` | Sets the modification time (last modified time) of files in the image put by Jib. (Note that this does not set the image creation time, which can be set using `<useCurrentTimestamp>`.) The value should either be `EPOCH_PLUS_SECOND` to set the timestamps to Epoch + 1 second (default behavior), or an ISO 8601 date-time parsable with [`DateTimeFormatter.ISO_DATE_TIME`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html) such as `2019-07-15T10:15:30+09:00` or `2011-12-03T22:42:05Z`.
chanseokoh marked this conversation as resolved.
Show resolved Hide resolved
`format` | `String` | `Docker` | Use `OCI` to build an [OCI container image](https://www.opencontainers.org/).
`jvmFlags` | `List<String>` | *None* | Additional flags to pass into the JVM when running your application.
`labels` | `Map<String, String>` | *None* | Key-value pairs for applying image metadata (similar to Docker's [LABEL](https://docs.docker.com/engine/reference/builder/#label) instruction).
`mainClass` | `String` | *Inferred*\*\* | The main class to launch your application from.
`ports` | `List<String>` | *None* | Ports that the container exposes at runtime (similar to Docker's [EXPOSE](https://docs.docker.com/engine/reference/builder/#expose) instruction).
`useCurrentTimestamp` | `boolean` | `false` | By default, Jib wipes all timestamps to guarantee reproducibility. If this parameter is set to `true`, Jib will set the image's creation timestamp to the time of the build, which sacrifices reproducibility for easily being able to tell when your image was created.
`useCurrentTimestamp` | `boolean` | `false` | By default, Jib wipes all timestamps to guarantee reproducibility. If this parameter is set to `true`, Jib will set the image's creation timestamp to the time of the build, which sacrifices reproducibility for easily being able to tell when your image was created. (Note that this property does not affect the file modification times, which can be configured using `filesModificationTime`.)
chanseokoh marked this conversation as resolved.
Show resolved Hide resolved
`user` | `String` | *None* | The user and group to run the container as. The value can be a username or UID along with an optional groupname or GID. The following are all valid: `user`, `uid`, `user:group`, `uid:gid`, `uid:group`, `user:gid`.
`volumes` | `List<String>` | *None* | Specifies a list of mount points on the container.
`workingDirectory` | `String` | *None* | The working directory in the container.
Expand Down Expand Up @@ -260,6 +261,7 @@ Property | Type | Default | Description
`jib.baseImageCache` | `File` | `[user cache home]/google-cloud-tools-java/jib` | Sets the directory to use for caching base image layers. This cache can (and should) be shared between multiple images.
`jib.applicationCache` | `File` | `[project dir]/target/jib-cache` | Sets the directory to use for caching application layers. This cache can be shared between multiple images.
`jib.console` | `String` | *None* | If set to `plain`, Jib will print plaintext log messages rather than display a progress bar during the build.
`jib.cacheBaseImage` | `String` | `as-needed` | Controls how Jib downloads and caches base image layers. When building to a registry with `as-needed`, Jib will skip base image layers that already exist in the target registry. `always` causes Jib to always cache layers locally.

*\* If you configure `args` while `entrypoint` is set to `'INHERIT'`, the configured `args` value will take precedence over the CMD propagated from the base image.*

Expand Down
6 changes: 4 additions & 2 deletions jib-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,13 @@ Property | Type | Default | Description
`entrypoint` | list | *None* | The command to start the container with (similar to Docker's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) instruction). If set, then `jvmFlags` and `mainClass` are ignored. You may also set `<entrypoint>INHERIT</entrypoint>` to indicate that the `entrypoint` and `args` should be inherited from the base image.\*
`environment` | map | *None* | Key-value pairs for setting environment variables on the container (similar to Docker's [ENV](https://docs.docker.com/engine/reference/builder/#env) instruction).
`extraClasspath` | `list` | *None* | Additional paths in the container to prepend to the computed Java classpath.
`filesModificationTime` | string | `EPOCH_PLUS_SECOND` | Sets the modification time (last modified time) of files in the image put by Jib. (Note that this does not set the image creation time, which can be set using `<useCurrentTimestamp>`.) The value should either be `EPOCH_PLUS_SECOND` to set the timestamps to Epoch + 1 second (default behavior), or an ISO 8601 date-time parsable with [`DateTimeFormatter.ISO_DATE_TIME`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html) such as `2019-07-15T10:15:30+09:00` or `2011-12-03T22:42:05Z`.
chanseokoh marked this conversation as resolved.
Show resolved Hide resolved
`format` | string | `Docker` | Use `OCI` to build an [OCI container image](https://www.opencontainers.org/).
`jvmFlags` | list | *None* | Additional flags to pass into the JVM when running your application.
`labels` | map | *None* | Key-value pairs for applying image metadata (similar to Docker's [LABEL](https://docs.docker.com/engine/reference/builder/#label) instruction).
`mainClass` | string | *Inferred*\*\* | The main class to launch the application from.
`ports` | list | *None* | Ports that the container exposes at runtime (similar to Docker's [EXPOSE](https://docs.docker.com/engine/reference/builder/#expose) instruction).
`useCurrentTimestamp` | boolean | `false` | By default, Jib wipes all timestamps to guarantee reproducibility. If this parameter is set to `true`, Jib will set the image's creation timestamp to the time of the build, which sacrifices reproducibility for easily being able to tell when your image was created.
`useCurrentTimestamp` | boolean | `false` | By default, Jib wipes all timestamps to guarantee reproducibility. If this parameter is set to `true`, Jib will set the image's creation timestamp to the time of the build, which sacrifices reproducibility for easily being able to tell when your image was created. (Note that this property does not affect the file modification times, which can be configured using `filesModificationTime`.)
chanseokoh marked this conversation as resolved.
Show resolved Hide resolved
`user` | string | *None* | The user and group to run the container as. The value can be a username or UID along with an optional groupname or GID. The following are all valid: `user`, `uid`, `user:group`, `uid:gid`, `uid:group`, `user:gid`.
`volumes` | list | *None* | Specifies a list of mount points on the container.
`workingDirectory` | string | *None* | The working directory in the container.
Expand Down Expand Up @@ -305,7 +306,8 @@ Property | Type | Default | Description
`jib.useOnlyProjectCache` | boolean | `false` | If set to true, Jib does not share a cache between different Maven projects (i.e. `jib.baseImageCache` defaults to `[project dir]/target/jib-cache` instead of `[user cache home]/google-cloud-tools-java/jib`).
`jib.baseImageCache` | string | `[user cache home]/google-cloud-tools-java/jib` | Sets the directory to use for caching base image layers. This cache can (and should) be shared between multiple images.
`jib.applicationCache` | string | `[project dir]/target/jib-cache` | Sets the directory to use for caching application layers. This cache can be shared between multiple images.
`jib.console` | `String` | *None* | If set to `plain`, Jib will print plaintext log messages rather than display a progress bar during the build.
`jib.console` | string | *None* | If set to `plain`, Jib will print plaintext log messages rather than display a progress bar during the build.
`jib.cacheBaseImage` | string | `as-needed` | Controls how Jib downloads and caches base image layers. When building to a registry with `as-needed`, Jib will skip base image layers that already exist in the target registry. `always` causes Jib to always cache layers locally.

*\* If you configure `args` while `entrypoint` is set to `'INHERIT'`, the configured `args` value will take precedence over the CMD propagated from the base image.*

Expand Down