Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports are not available #185

Open
matthiasulrich opened this issue Oct 28, 2021 · 0 comments
Open

Ports are not available #185

matthiasulrich opened this issue Oct 28, 2021 · 0 comments

Comments

@matthiasulrich
Copy link

matthiasulrich commented Oct 28, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant