Skip to content

Commit

Permalink
add subscription to virt-v2v second base
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto González <[email protected]>
  • Loading branch information
ernesgonzalez33 authored and mnecas committed Oct 18, 2024
1 parent 1b28fea commit 9b19cb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 5 additions & 3 deletions build/ovirt-populator/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ ENV GOEXPERIMENT strictfipsruntime

RUN GOOS=linux GOARCH=amd64 go build -o ovirt-populator github.com/konveyor/forklift-controller/cmd/ovirt-populator

FROM registry.access.redhat.com/ubi8-minimal:8.10-1086
# FROM registry.access.redhat.com/ubi8-minimal:8.10-1086
FROM registry.access.redhat.com/ubi8/ubi:8.10-1088
COPY --from=builder /app/ovirt-populator /usr/local/bin/ovirt-populator
RUN microdnf install -y subscription-manager
# RUN microdnf install -y subscription-manager
RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey")
RUN microdnf install -y python3-ovirt-engine-sdk4 ovirt-imageio-client && microdnf clean all
RUN subscription-manager repos --enable=rhv-4-tools-for-rhel-8-x86_64-rpms
RUN dnf install -y python3-ovirt-engine-sdk4 ovirt-imageio-client && dnf clean all

ENTRYPOINT ["/usr/local/bin/ovirt-populator"]
LABEL \
Expand Down
19 changes: 11 additions & 8 deletions build/virt-v2v/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,22 @@ RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-monitor github
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o image-converter github.com/konveyor/forklift-controller/cmd/image-converter
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-wrapper virt-v2v/cmd/entrypoint.go

FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1726694542
FROM registry.access.redhat.com/ubi9:9.4-1214.1726694543

RUN rm /etc/pki/tls/fips_local.cnf && \
echo -e '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' > /etc/pki/tls/fips_local.cnf && \
sed -i '/^\\[ crypto_policy \\]/a Options=RHNoEnforceEMSinFIPS' /etc/pki/tls/openssl.cnf
RUN mv /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak && \
ln -sf /opt/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt
# RUN rm /etc/pki/tls/fips_local.cnf && \
# echo -e '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' > /etc/pki/tls/fips_local.cnf && \
# sed -i '/^\\[ crypto_policy \\]/a Options=RHNoEnforceEMSinFIPS' /etc/pki/tls/openssl.cnf
# RUN mv /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak && \
# ln -sf /opt/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt

# RUN microdnf install -y subscription-manager
RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey")
RUN mkdir /disks && \
source /etc/os-release && \
microdnf install -y \
dnf install -y \
virt-v2v \
virtio-win && \
microdnf clean all
dnf clean all

ENV LIBGUESTFS_BACKEND=direct

Expand Down

0 comments on commit 9b19cb7

Please sign in to comment.