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

THREESCALE-11393: Upgrade the Dockefile for system image based on RHEL8 #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mayorova
Copy link

@mayorova mayorova commented Oct 2, 2024

Update the Dockerfile for building a system image with Oracle dependencies, based on the system image from 3scale 2.15.

https://issues.redhat.com/browse/THREESCALE-11393

@mayorova mayorova changed the title Upgrade the Dockefile for system image based on RHEL8 THREESCALE-11393: Upgrade the Dockefile for system image based on RHEL8 Oct 3, 2024
@@ -1,4 +1,5 @@
FROM registry.redhat.io/3scale-amp2/system-rhel7:3scale2.14
# FROM registry.redhat.io/3scale-amp2/system-rhel8:3scale2.15
FROM registry-proxy.engineering.redhat.com/rh-osbs/3scale-amp2-system-rhel8:1.17.0-529

Choose a reason for hiding this comment

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

we should probably use a public image uri?

Comment on lines -10 to +11
ENV LD_LIBRARY_PATH=/opt/oracle/instantclient/:$LD_LIBRARY_PATH \
ENV LD_LIBRARY_PATH=/opt/oracle/instantclient/ \

Choose a reason for hiding this comment

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

why change this?

Comment on lines -16 to +20
RUN ./script/oracle/install-instantclient-packages.sh \
&& source /opt/app-root/etc/scl_enable \
&& DB=oracle bundle install --local --deployment --jobs $(grep -c processor /proc/cpuinfo) --retry=5
RUN dnf install wget unzip make ruby-devel gcc gcc-c++ redhat-rpm-config libaio -y \
&& ./script/oracle/install-instantclient-packages.sh \
&& ln -s /usr/lib64/libnsl.so.2 /usr/lib64/libnsl.so.1 \
&& DB=oracle bundle install --jobs $(grep -c processor /proc/cpuinfo) --retry=5

Choose a reason for hiding this comment

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

I assume this is the ultimate fix. The root of the issue is that when building the system image, we now remove most build dependencies to have a slimmer image.

I don't know if we support disconnected environments. But installing these deps during build will not work in such.

So the above is a valid solution for internet connected builds. Although I'm concerned about the nsl linking.

An alternative solution would be to ship also a builder image that will be used for this kind of builds 🤔

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