# Start Wordpress with Docker

日本語版: 日本語で読む

Table of Contents

Since personal development is complete and there is nothing left to do, I decided to try to solve this issue I want to automatically upload an eye-catching image when publishing an article #1.

So I tried to access the development environment, but since I changed my computer, I realized that I had to install Local - Local WordPress development made simple.

However, for some reason, I was really reluctant to do so, so I decided to build an environment with Docker.

Start Worspress with Docker

Quickstart: Compose and WordPress

The documentation was well-prepared, so all you had to do was follow it.

First, generate the docker-compose.yml file.

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:

and execute it with docker-compose up -d.

Then, the following error occurred.

Terminal window
/c/dev/wordpress
$ docker-compose up -d
time="2025-02-10T07:49:35+09:00" level=warning msg="C:\\dev\\wordpress\\docker-compose.yml: the attribute `version` is obsolete, it will be ignoed, please remove it to avoid potential confusion"
[+] Running 0/2
- db Pulling 3.1s
- wordpress Pulling 3.1s
no matching manifest for linux/arm64/v8 in the manifest list entries

The content of the error is

This is because the Docker image you are using does not support linux/arm64/v8.

That seems to be the case.

- image: mysql:5.7
+ image: mysql:8.0

mysql:5.7 is arm64 There isn’t enough support for mysql:8.0, so try CODE_0.

Terminal window
$ docker-compose up -d
time="2025-02-10T07:52:13+09:00" level=warning msg="C:\\dev\\wordpress\\docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
[+] Running 35/2
wordpress Pulled 43.4s
db Pulled 69.3s
[+] Running 4/4
Network wordpress_default Created 0.1s
Volume "wordpress_db_data" Created 0.0s
Container wordpress-db-1 Started 0.5s
Container wordpress-wordpress-1 Started

I passed safely.

You can open it by going to http://localhost:8000.

I’ll start it soon.


(2025/2/15)

I was told that docker-compose.yml does not need to include the version, so I made a correction.

Apparently docker-compose.yml is also deprecated.

Is that docker-compose.yaml correct?


More Posts
My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


Comments