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

chore: use ubi9 in testing dockerfile #71

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
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
26 changes: 10 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Build vmaas app with local changes to vmaas-lib
FROM registry.access.redhat.com/ubi8/ubi-minimal

# install postgresql from centos if not building on RHSM system
RUN FULL_RHEL=$(microdnf repolist --enabled | grep rhel-8) ; \
if [ -z "$FULL_RHEL" ] ; then \
rpm -Uvh http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-4.el8.noarch.rpm \
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-4.el8.noarch.rpm && \
sed -i 's/^\(enabled.*\)/\1\npriority=200/;' /etc/yum.repos.d/CentOS*.repo ; \
fi
FROM registry.access.redhat.com/ubi9/ubi-minimal

ARG VAR_RPMS=""
RUN microdnf module enable postgresql:12 && \
microdnf module enable nginx:1.20 && \
microdnf install --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
RUN curl -o /etc/yum.repos.d/postgresql.repo \
https://copr.fedorainfracloud.org/coprs/mmraka/postgresql-16/repo/epel-9/mmraka-postgresql-16-epel-9.repo

RUN microdnf install -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
python311 python3.11-pip python3-rpm which nginx rpm-devel git-core shadow-utils diffutils systemd libicu postgresql go-toolset \
$VAR_RPMS && \
ln -s /usr/lib64/python3.6/site-packages/rpm /usr/lib64/python3.11/site-packages/rpm && \
ln -s /usr/lib64/python3.9/site-packages/rpm /usr/lib64/python3.11/site-packages/rpm && \
ln -s $(basename /usr/lib64/python3.9/site-packages/rpm/_rpm.*.so) /usr/lib64/python3.9/site-packages/rpm/_rpm.so && \
microdnf clean all

RUN git clone https://github.com/RedHatInsights/vmaas.git --branch master /vmaas
Expand All @@ -25,10 +19,10 @@ WORKDIR /vmaas
ENV LC_ALL=C.utf8
ENV LANG=C.utf8
ARG VAR_POETRY_INSTALL_OPT="--only main"
RUN pip3 install --upgrade pip && \
pip3 install --upgrade poetry~=1.5
RUN pip3.11 install --upgrade pip && \
pip3.11 install --upgrade poetry~=1.5
RUN poetry export $VAR_POETRY_INSTALL_OPT -f requirements.txt --output requirements.txt && \
pip3 install -r requirements.txt
pip3.11 install -r requirements.txt

RUN install -m 1777 -d /data && \
adduser --gid 0 -d /vmaas --no-create-home vmaas
Expand Down
Loading