django-DefectDojo icon indicating copy to clipboard operation
django-DefectDojo copied to clipboard

Docker failure on all new Apple M1 (arm64) machines.

Open preston opened this issue 3 years ago • 1 comments

All new macOS machines ship with an M1 or M2 chip that uses an ARM-based instruction set, not Intel/AMD x64. Any referenced images must support a "linux/arm64/v8" option in the manifest to work for these machines. When using the dc-up.sh script, the docker-compose.yml file is unable to find a compatible MySQL image.

All the recent versions of the official MySQL images are built and published as multi-architecture, but the 5.x series is not. (See https://hub.docker.com/_/mysql/tags) Until this is updated or changed, the MySQL-based profiles will be likely be broken for all Apple users on recent hardware.

preston avatar Aug 29 '22 19:08 preston

Just update the compose files. It’s what I do.

37b avatar Sep 18 '22 00:09 37b

Was running into the same issues. Unfortunately, out of the box the PostgreSQL options also don't work due to https://github.com/psycopg/psycopg2/issues/1360.

Upgrading MySQL here: https://github.com/DefectDojo/django-DefectDojo/blob/07961dd1549afe51933c5ab3dfba051feb791d72/docker-compose.yml#L132-L133 to mysql:8 seems to work as arm64 exist for MySQL 8.

Not sure if this exactly introduces any errors though, as I was just trying out the first time. There seems to be #6971 but apparently upstream won't be moving to MySQL 8 for now.

Alternatively running the images on amd64 mode on macOS likely also would work, but with a severe performance hit. For this, you can try: export DOCKER_DEFAULT_PLATFORM=linux/amd64

Nirusu avatar Oct 29 '22 15:10 Nirusu

Hello @Preston ,

I am using image: mysql:latest

Best Regards, Fábio Sbano

fsbano avatar Jan 13 '23 23:01 fsbano

For me it works fine with postgres. What about you @quirinziessler ? I guess this can be closed @mtesauro

manuel-sommer avatar Feb 03 '24 11:02 manuel-sommer

@manuel-sommer same for me. Only on debug I get some errors regarding mailhog but everything runs fine. Can be closed imo.

quirinziessler avatar Feb 03 '24 20:02 quirinziessler