0

I have no knowledge of docker and its inner workings.

I have a docker image of an application which support has installed on my Linux Desktop. Current version of mySql when queried through docker prompt is 5.5.6

I updated mysql on my desktop to 5.7.x but still inside docker prompt its showing 5.5.6 .. Can anyone help me out ? Output --

dockerdev@localhost:~$ ps -aef | grep mysql
root        31    28  0 14:45 ?        00:00:00 runsv mysql
root        40    34  0 14:45 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql      471    40  0 14:45 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

dockerdev@localhost:~$ mysql -V
mysql  Ver 14.14 Distrib 5.5.62, for debian-linux-gnu (x86_64) using readline 6.3

I run the docker container

docker-compose -f ./application.yml up -d

application.yml

---
myapp:
  image: docker.xyz.com/myapp:latest
  container_name: myapp
  hostname: localhost
  ports:
    - "80:80"       # Apache
    - "8000:8000"   # Tomcat
    - "3306:3306"   # Mysql    
  environment: ....
  links: ....
  volumes: 
    # MySQL Data
    - /home/kunal/perfios/containers/kubera/perfios/mysql-data:/var/lib/mysql/
user1428716
  • 2,078
  • 2
  • 18
  • 37
  • 1
    From your description. You have two different versions, right? Your host (PC,laptop) and a docker container, is that right? – abestrad Jun 23 '20 at 09:33
  • @abestrad thats correct – user1428716 Jun 23 '20 at 09:39
  • So, they are living in different worlds, any changes to the host won't affect the containers version, if you want to upgrade or use a different version in your container(s), you have to pull and run the mysql version from the registry. – abestrad Jun 23 '20 at 09:44
  • I am not getting instructions to upgrade - I followed https://stackoverflow.com/questions/26734402/how-to-upgrade-docker-container-after-its-image-changed but to no avail. – user1428716 Jun 23 '20 at 10:05
  • I did - 1) docker pull mysql:5.6 ( 2) docker rm -f (3) docker run --name app_db --restart unless-stopped \ -e MYSQL_ROOT_PASSWORD=root123 \ -d mysql:5.6 – user1428716 Jun 23 '20 at 10:07
  • Now when i run docker-compose application.yml - it throws an error name used elsewhere – user1428716 Jun 23 '20 at 10:08

0 Answers0