visiblevc / wordpress-starter

A slightly less shitty wordpress development workflow
688 stars 167 forks source link

Ports are not available #185

Open matthiasulrich opened 2 years ago

matthiasulrich commented 2 years ago

Hi

I have gone through the sample routine exactly. But when I want to start the container with docker-compose up -d && docker-compose logs -f wordpress, I get the following error message:

Error response from daemon: Ports are not available: listen tcp 0.0.0.0:8080: bind: address already in use.

I removed all containers, restarted Docker, rebooted computer, didn't help though.

Operating-Sytem: Mac OS 11.6 Docker-Desktop Version: 4.1.1 Docker Version Console Output:

Client:
 Cloud integration: 1.0.17
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:55:20 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:52:31 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.9
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        v1.0.1-0-g4144b63
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker-compose.yml

I had an earlier error message, so i had to set the privileges to true I have left out php-Admin

version: '3'
services:
    wordpress:
        image: visiblevc/wordpress
        privileged: true

        # required for mounting bindfs
        cap_add:
            - SYS_ADMIN
        devices:
            - /dev/fuse
        # required on certain cloud hosts
        security_opt:
            - apparmor:unconfined

        ports:
            - 8080:80
            - 443:443
        volumes:
            - ./data:/data
            - ./scripts:/docker-entrypoint-initwp.d
        environment:
            DB_NAME: wordpress
            DB_PASS: root
            PLUGINS: >-
                academic-bloggers-toolkit
                co-authors-plus
                [WP-API]https://github.com/WP-API/WP-API/archive/master.zip

    db:
        image: mariadb:10 # or mysql:5.7
        volumes:
            - data:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: root

volumes:
    data:

How can I tell Docker to listen on a different port?