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

fix: ubuntu16 pre-build container #16

Merged
merged 1 commit into from
May 15, 2024
Merged

fix: ubuntu16 pre-build container #16

merged 1 commit into from
May 15, 2024

Conversation

gsanchezgavier
Copy link
Contributor

Molecule was installing extra tools over the pre-build container which made the python2 installation failed.
see following verbose log:

TASK [Create Dockerfiles from image names] *************************************
--- before
+++ after: /home/ubuntu/.ansible/tmp/ansible-local-58232knngsotc/tmpx4ij7gqi/Dockerfile.j2
@@ -0,0 +1,11 @@
+# Molecule managed
+
+FROM ghcr.io/newrelic/pkg-installation-testing-action-ubuntu1604:latest
+
+
+RUN if [ $(command -v apt-get) ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude rsync && apt-get clean && rm -rf /var/lib/apt/lists/*; \
+    elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute rsync && dnf clean all; \
+    elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute rsync && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
+    elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 sudo bash iproute2 rsync && zypper clean -a; \
+    elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 sudo bash ca-certificates rsync; \
+    elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 rsync && xbps-remove -O; fi

This PR adds pre_build_image to that container to prevent this

@gsanchezgavier gsanchezgavier requested a review from a team May 15, 2024 14:39
Copy link
Contributor

@rubenruizdegauna rubenruizdegauna left a comment

Choose a reason for hiding this comment

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

LGTM. Almost there!!! 💪

@gsanchezgavier gsanchezgavier merged commit de76068 into main May 15, 2024
5 checks passed
@gsanchezgavier gsanchezgavier deleted the fix-ubuntu16 branch May 15, 2024 15:01
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