Hi Team,
We have tried to install mysql server on amazonlinux:2 container image. We unable to run the MySQL service on the container image.
-
docker run -it amazonlinux:2 bash
-
yum update -y && yum install mysql -y
bash-4.2# mysql --version
mysql Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1
bash-4.2# systemctl start mysql.service
Failed to get D-Bus connection: Operation not permitted
https://aws.amazon.com/amazon-linux-2/release-notes/
systemd
Amazon Linux 2 provides the systemd service and systems manager (in place of System V init). As a result, applications running on Amazon Linux AMI may require changes to run on Amazon Linux 2. Amazon Elastic Compute Cloud (Amazon EC2) instances running Amazon Linux will not be upgradeable to Amazon Linux 2 through rolling upgrade mechanisms.
Amazon Linux 2 uses the systemd 219 init system to bootstrap userspace and manage system processes. It is available as /sbin/init and replaces the System V-style init system that was available in the previous generation of Amazon Linux. As a result, initscripts should no longer exist in /etc/init.d. systemctl {start|stop|restart} SERVICE_NAME.service should be used in its place. Additionally, service SERVICE_NAME {start|stop|restart} is compatible with both Amazon Linux AMI and Amazon Linux 2.
Reason for using amazonlinux:2 container image. We are planning to use amazonlinux:2 as our common container image for all our product.
Please update us here any additional info needed on this.
Thanks