Replies: 7 comments 10 replies
-
Using the docker-compose.yml from https://github.com/docker-library/docs/tree/master/wordpress#-via-docker-stack-deploy-or-docker-compose |
Beta Was this translation helpful? Give feedback.
-
I'm using MacOS 12.4, already disabled the firewall, tried different browsers. version: '3.1'
services:
mariadb:
container_name: APP_mariadb
image: mariadb:10.5
command:
- '--default-authentication-plugin=mysql_native_password'
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
- '--skip-name-resolve'
volumes:
- ./db_volume:/var/lib/mysql
cap_add:
- SYS_NICE # CAP_SYS_NICE
environment:
MYSQL_INITDB_SKIP_TZINFO: '1'
MYSQL_ALLOW_EMPTY_PASSWORD: 'false'
### Database initialization config:
MARIADB_ROOT_PASSWORD: 'root123'
MARIADB_USER: 'app'
MARIADB_PASSWORD: 'app123'
MARIADB_DATABASE: 'applights'
ports:
- 3380:3306
restart: always
# networks:
# - app_group
wordpress:
container_name: APP_wp_applights
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: 'app'
WORDPRESS_DB_PASSWORD: 'app123'
WORDPRESS_DB_NAME: 'applights'
volumes:
- ./wp_applights_volume:/var/www/html
# - wp_applights_volume:/var/www/html
- ./docker/config/php-custom.ini:/usr/local/etc/php/conf.d/custom.ini:cached,ro
# networks:
# - app_group
# networks:
# app_group:
# external: false
# volumes:
# wp_applights_volume:
# driver: local
# db_volume:
# driver: local |
Beta Was this translation helpful? Give feedback.
-
I just installed Docker on Windows 11, and tried the compose file above with a fresh installation. Getting the same result. Then just copied the plain docker-compose from Docker Hub, and started it on Windows 11. Same result: |
Beta Was this translation helpful? Give feedback.
-
I had the same issue. I used image is wordpress:latest and wordpress:php8.1-fpm-alpine.(Neither will work on ports 6666/7777)
|
Beta Was this translation helpful? Give feedback.
-
I have had the same issue and I was not able to continue until I found a solution. From what I can tell this is only an issue if you are mapping the port to something other than 80. What I did was edit the apache server config files to match the port that was set for the container. In /etc/apache2/sites-enabled/000-default.conf then in /etc/apache2/ports.conf I added the line then after running everything was working as expected |
Beta Was this translation helpful? Give feedback.
-
ChatGPT suggested running the socat command in the container:
Unfortunately, this requires socat to be installed after the container is created, in addition socat must be running in the background because otherwise it blocks the console
@visionm45 Is there any way to automate such configuration change in apache's files from docker-compose.yml? |
Beta Was this translation helpful? Give feedback.
-
To make this work, you can't use the To achieve this:
|
Beta Was this translation helpful? Give feedback.
-
As mentioned in some earlier issues (#611, #493, #480), the given
docker-compose.yml
on hub.docker.com with port mapping8080:80
does not work, because the port mapping itself breaks the loopback, resulting in two critical errors:So it should be either added a necessary step to fix this issue with port mapping (which I am currently not aware of), or it should be changed to
port 80:80
, which currently solves the issue, mentioning that other port mappings currently will not work.Beta Was this translation helpful? Give feedback.
All reactions