Skip to content

Commit

Permalink
[OPENJDK-1165] install tar in the runtime images
Browse files Browse the repository at this point in the history
`oc rsync` requires either `tar` or `rsync` to be present in the
container images. `oc cp` requires `tar`. Install `tar` in the
runtime images so that both `oc` commands function. This results
in a negligible (+0.6MiB) increase in container size.

    <https://issues.redhat.com/browse/OPENJDK-1165>

`tar` and `rsync` are already present in the builder images.

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Dec 8, 2023
1 parent 723ad6f commit b320d1e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/tar/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version: 1
name: jboss.container.tar
version: '1.0'
description: Installs the Tar RPM to enable `oc cp` and `oc rsync`

packages:
install:
- tar
7 changes: 7 additions & 0 deletions tests/features/java/openjdk.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ Feature: Miscellaneous OpenJDK-related unit tests
| arg | value |
| command | bash -c "$JAVA_HOME/bin/java -XshowSettings:properties -version" |
Then available container log should contain file.encoding = UTF-8

@ubi9
Scenario: Ensure tar is installed (OPENJDK-1165)
When container is started with args
| arg | value |
| command | tar |
Then available container log should not contain command not found
1 change: 1 addition & 0 deletions ubi9-openjdk-11-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ modules:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.tar
- name: jboss.container.openjdk.jre
version: "11"
- name: jboss.container.java.jre.run
Expand Down
1 change: 1 addition & 0 deletions ubi9-openjdk-17-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ modules:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.tar
- name: jboss.container.openjdk.jre
version: "17"
- name: jboss.container.java.jre.run
Expand Down
1 change: 1 addition & 0 deletions ubi9-openjdk-21-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ modules:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.tar
- name: jboss.container.openjdk.jre
version: "21"
- name: jboss.container.java.jre.run
Expand Down

0 comments on commit b320d1e

Please sign in to comment.