1

I am facing an issue when i want to run a mysql container: I tried with the example command i found on the Docker hub:

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.24
docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES
2569c1a8cbd2        mysql:5.6.24        "/entrypoint.sh mysq…"   5 seconds ago       Exited (139) 4 seconds ago                       some-mysql

Shows that the container exited with code 139

And i can't have a single line of logs: the return of the docker logs command is empty...

~ docker logs 2569c1a8cbd2 
~ 

I am using Docker(v19.03.1, build 74b1e89) for Debian(v10.0)

Viak
  • 59
  • 6
  • strange. I ran the same command on my machine and it works. Have you tried with latest version of mysql? What OS are you using? What is your docker version? – golobitch Jul 30 '19 at 08:49
  • Yes i tried with the latest version of mysql and it is working correctly, but i need this version in order to match with the mysql used in production... Im using docker v19.03.1 on debian(v10.0) – Viak Jul 30 '19 at 09:03
  • Check this: https://stackoverflow.com/questions/46724237/docker-exiting-with-status-code-139?rq=1 – golobitch Jul 30 '19 at 09:05
  • 1
    one thing to check , make sure you are using x86/amd64 architecture since that only this image supports – LinPy Jul 30 '19 at 09:12
  • Hi, yes i checked, I am using a x86/amd64 architecture... – Viak Jul 30 '19 at 12:41

3 Answers3

1

Are you running other containers? (maybe a separate project?)

I have two separate projects with their separate docker-compose files and their own services.

When one is running, the one with a mysql/mariadb container exits with 139. If I docker-compose down the other project, then the mysql container starts correctly.

I'm still figuring out why (came here for an answer to my problem), but you might have something similar.

Rafa
  • 1,397
  • 15
  • 21
0

Today I had the same issue after an upgrade from Debian 9 to 11. The mysql:5.6.24 Docker image just doesn't want to start. My solution was to upgrade to image mysql:5-debian

https://hub.docker.com/layers/mysql/library/mysql/5-debian/images/sha256-5adbbb05d43e67a7ed5f4856d3831b22ece5178d23c565b31cef61f92e3467ea?context=explore

Rob Juurlink
  • 4,516
  • 3
  • 20
  • 19
0

I'm using a Macbook Pro M1.

In Docker Desktop

Settings -> Features in development

Untick "Use Rosetta for x86/amd64 emulation on Apple Silicon"

enter image description here

Source: https://github.com/docker/roadmap/issues/384#issuecomment-1519853919

Mark
  • 1,337
  • 23
  • 34