centos8 container: tweak package installation

- don't install pymysql: mysqlclient is the package we need [1]
- use newly packaged python3-mysql from epel and drop development
  dependencies [2]

[1]: https://docs.djangoproject.com/en/3.0/ref/databases/#mysql-db-api-drivers
[2]: https://github.com/ansible-community/ara/issues/151

Change-Id: Iadee9e80fa42ce9fbf3f8318bbc4537cf144468b
This commit is contained in:
David Moreau Simard 2020-07-23 21:55:29 -04:00
parent 560f8c5d2f
commit fc79a84fac
No known key found for this signature in database
GPG Key ID: 7D4729EC4E64E8B7
1 changed files with 1 additions and 3 deletions

View File

@ -6,9 +6,7 @@ build=$(buildah from centos:8)
# This lets users swap easily from the sqlite default to mysql or postgresql just by tweaking settings.yaml.
# Note: We use the packaged versions of psycopg2 and mysql python libraries so
# we don't need to install development libraries before installing them from PyPi.
buildah run "${build}" -- /bin/bash -c "dnf update -y && dnf install -y epel-release && dnf install -y python3-pip python3-gunicorn python3-psycopg2 mysql mysql-devel gcc platform-python-devel && dnf clean all"
buildah run "${build}" -- /bin/bash -c "pip3 install PyMySQL mysqlclient"
buildah run "${build}" -- /bin/bash -c "dnf update -y && dnf install -y epel-release && dnf install -y python3-pip python3-gunicorn python3-psycopg2 python3-mysql && dnf clean all"
# Install ara from source with API server extras for dependencies (django & django-rest-framework)
buildah run "${build}" -- /bin/bash -c "pip3 install ara[server]"