I tried running WordPress with docker preview on M1 Mac.

I wanted to test the docker preview as it was open to the public.

The docker preview of M1 Mac came out, so I tested it immediately. I usually develop with WordPress of VPS, but I will try to run it locally. In addition, localbyflywheel is already compatible with Silicon, so If you're just developing WordPress, I think it's easier.

Where you downloaded docker https://www.docker.com/blog/download-and-try-the-tech-preview-of-docker-desktop-for-m1/

reference https://docs.docker.jp/compose/wordpress.html

First of all, docker-compose without thinking

Create docker-compose.yml in a folder called docker-test and copy and paste from the above reference address

docker-compose.yml


version: '3'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
volumes:
    db_data:
$ docker-compose up     
Creating network "docker-test_default" with the default driver
Pulling db (mysql:5.7)...
5.7: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

While pulling mysql, `` `ERROR: no matching manifest for linux/arm64/v8``` appears.

It seems that docker-image also needs arm_64 support

Check mysql of docker hub

image.png

It seems that it doesn't work because it is only x86-64 and there is no arm64.

Change from mysql to mariadb

Check mariadb.

image.png

Likely to go. Partially changed docker-compose.yml

docker-compose.yml


version: '3'

services:
   db:
     image: mariadb
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
volumes:
    db_data:

Replaced the db: image part from `mysql: 5.7``` to `mariadb```

$ docker-compose up

Since there was no error, open localhost: 8000 in a browser.

image.png

moved. There was no problem logging in.

bonus

image.png

In Activity Monitor, Docker Desktop seems to be intel and only Docker core is apple. I haven't run it that much yet, but neither CPU usage nor memory usage is that great. It took a while to start up for the first time, but it's comfortable because the browser is explosive.

Recommended Posts

I tried running WordPress with docker preview on M1 Mac.
I tried running Ansible on a Docker container
I tried running Java on a Mac terminal
I tried BIND with Docker
WordPress with Docker Compose on CentOS 8
Use Docker on your M1 Mac
How to use mysql with M1 mac Docker preview version
I tried running a Docker container on AWS IoT Greengrass 2.0
I tried deploying a Docker container on Lambda with Serverless Framework
I tried using Scalar DL with Docker
Run Ubuntu + ROS with Docker on Mac
I tried running the Angular sample in Auth0 Quick Start with Docker
Try running MPLS-VPN with FR Routing on Docker
I tried using Junit on Mac VScode Maven
I tried putting Java on my Mac easily
I tried to verify AdoptOpenJDK 11 (11.0.2) with Docker image
Try running OSPF with FR Routing on Docker
I tried installing docker on an EC2 instance
I tried Getting Started with Gradle on Heroku
I tried using Docker Desktop for Windows on Windows 10 Home
I tried installing Ruby on Rails related plugin with vim-plug
I tried to make an introduction to PHP + MySQL with Docker
I tried DI with Ruby
I tried the Docker tutorial!
I tried to create React.js × TypeScript × Material-UI on docker environment
I tried UPSERT with PostgreSQL.
I tried to create a padrino development environment with Docker
I tried running a letter of credit transaction application with Corda 1
Install metrics-server with Helm on Kubernetes that comes with Docker for Mac
I tried to build the environment of PlantUML Server with Docker
I tried to implement the image preview function with Rails / jQuery
I tried to create a Spring MVC development environment on Mac
Prepare a transcendentally simple PHP & Apache environment on Mac with Docker
Steps to run docker on Mac
Try using Redmine on Mac docker
I tried morphological analysis with MeCab
Try running cloudera manager with docker
I tried to interact with Java
I tried UDP communication with Java
I tried GraphQL with Spring Boot
I tried installing CentOS 8 on ESXi 6.7
I tried Flyway with Spring Boot
I tried customizing slim with Scaffold
When I tried to build an environment of PHP7.4 + Apache + MySQL with Docker, I got stuck [Windows & Mac]
I tried to make an automatic backup with pleasanter + PostgreSQL + SSL + docker
Starting with installing Docker on EC2 and running Yellowfin in a container
I tried to build a Firebase application development environment with Docker in 2020
I tried migrating the portfolio created on Vagrant to the Docker development environment
After all I wanted to preview the contents of mysql with Docker ...
Since the docker-desktop preview for m1 came out, I tried to face it with my macbook pro 15inch
I tried using Realm with Swift UI
Laravel development environment construction with Docker (Mac)
Customize OpenFOAM v8 Docker Image on Mac
I installed Docker on my Raspberry Pi 3
Install Docker Desktop for Mac with Homebrew
Scraping with puppeteer in Nuxt on Docker.
Getting Started with Docker for Mac (Installation)
Try running Slack's (Classic) Bot with docker
I can't install rails on my mac
I tried using OnlineConverter with SpringBoot + JODConverter
I tried time-saving management learning with Studyplus.