Created
May 8, 2021 03:16
-
-
Save socketwench/4487ad52a3a85178a3a6e9f3faea4287 to your computer and use it in GitHub Desktop.
Install MySQL python lib on Ansible k8s operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM quay.io/operator-framework/ansible-operator:latest | |
COPY requirements.yml ${HOME}/requirements.yml | |
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \ | |
&& chmod -R ug+rwx ${HOME}/.ansible | |
COPY watches.yaml ${HOME}/watches.yaml | |
COPY roles/ ${HOME}/roles/ | |
COPY playbooks/ ${HOME}/playbooks/ | |
USER root | |
ADD https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm /tmp/mysql80-community-release-el8-1.noarch.rpm | |
RUN yum install -y /tmp/mysql80-community-release-el8-1.noarch.rpm && \ | |
yum install -y mysql-community-client mysql-community-common mysql-community-libs && \ | |
yum install -y gcc python3-devel mysql-community-devel && \ | |
pip3 install mysqlclient && \ | |
yum remove -y gcc python3-devel mysql-community-devel && \ | |
rm -rf /tmp/* | |
USER ansible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment