Skip to content

Add UBI 10 micro based Dockerfiles - #781

Open
halim-lee wants to merge 9 commits into
vNextfrom
ubi-micro
Open

Add UBI 10 micro based Dockerfiles#781
halim-lee wants to merge 9 commits into
vNextfrom
ubi-micro

Conversation

@halim-lee

Copy link
Copy Markdown
Contributor

No description provided.

@leochr leochr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halim-lee Thank you for the updates. Added a comment about the IBM Java 8 UBI Micro image. The changes to 26.0.0.8 are not needed and can be removed.
The vNext pipeline can build using the latest directory and then retag those images with the version prefix.

# Then build and tag as 'ibmjava:10-ubi'
# $> docker build -t ibmjava:10-ubi -f ./java/Dockerfile.ubi10.minimal java

FROM ibmjava:10-ubi AS builder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix for the SCC generation issue with IBM Java 8 is now included with vNext (as well as main branch). Let's switch to the official UBI Micro image for IBM Java 8: icr.io/appcafe/ibmjava:8-jre-ubi10-micro

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we only change micro or minimal as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

micro image is updated:

FROM icr.io/appcafe/ibmjava:8-jre-ubi10-micro

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Only micro at this time.

@leochr leochr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halim-lee Thank you for the updates. Added some inquiries.

"BuildLabel"="$LIBERTY_BUILD_LABEL"

# Add default user 1001 and create wlp with right user/permissions before copying
RUN echo "1001:x:1001:0::/home/1001:/sbin/nologin" >> /etc/passwd \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User 1001 is added in IBM Java 8 (here), do we still need this line and the next 2 lines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still need those. useradd -u 1001 is added in the builder stage, unlike minimal (here). Without these lines, I get:

bash-5.2$ whoami
whoami: cannot find name for user ID 1001
bash-5.2$ id 1001
id: '1001': no such user

With the lines:

bash-5.2$ whoami
1001
bash-5.2$ id 1001
uid=1001(1001) gid=0(root) groups=0(root)

COPY --from=builder /usr/lib64/libidn2.so* /usr/lib64/
COPY --from=builder /usr/lib64/libunistring.so* /usr/lib64/
COPY --from=builder /usr/lib64/libuuid.so* /usr/lib64/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findutils and openssl packages are added for UBI Minimal. Do we need them for Micro? or are they already present?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While these packages get installed in UBI minimal, they don't install any additional packages/dependencies; they already exist in minimal. All required binaries and dependencies for those two are in micro as well.

# If there is a local copy of the image use that instead
COPY resources/ /tmp/

RUN microdnf -y install shadow-utils unzip wget openssl \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to confirm findutils is not needed in this build stage?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findutils already exists in micro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants