SoftCreatRMedia / wsc-dockerized

WSC (WoltLab Suite Core) in Docker
ISC License
14 stars 6 forks source link

Docker Desktop Container hat kein "Internet" #12

Closed ps915 closed 4 months ago

ps915 commented 4 months ago

Hi,

leider hat mein Docker Desktop Container kein "Internet" denke ich. Paket-Server sind "Offline" und die Suche im Store ergibt keinerlei Treffer.

C:\Users\phils>docker network ls
NETWORK ID     NAME                         DRIVER    SCOPE
75e02da19ccc   bridge                       bridge    local
5fe80ae870d2   host                         host      local
ff053ead81ec   none                         null      local
d8bf22747089   wsc-dockerized_wsc-network   bridge    local
ps915 commented 4 months ago
Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Installieren Sie die neueste PowerShell für neue Funktionen und Verbesserungen! https://aka.ms/PSWindows

PS C:\Users\phils> docker inspect ee4d48a5c5d1
[
    {
        "Id": "ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2",
        "Created": "2024-06-18T17:10:41.347141051Z",
        "Path": "/docker-entrypoint.sh",
        "Args": [
            "nginx",
            "-g",
            "daemon off;"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 466,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-06-18T17:48:44.060622506Z",
            "FinishedAt": "2024-06-18T17:48:30.502180158Z"
        },
        "Image": "sha256:70ea0d8cc5300acde42073a2fbc0d28964ddb6e3c31263d92589c2320c3ccba4",
        "ResolvConfPath": "/var/lib/docker/containers/ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2/hostname",
        "HostsPath": "/var/lib/docker/containers/ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2/hosts",
        "LogPath": "/var/lib/docker/containers/ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2/ee4d48a5c5d1d6995454038a0b7c6de10837e6855dd2773b84d784d8bdad52b2-json.log",
        "Name": "/wsc-dockerized-nginx-1",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "9043e0ef2dee6c98a6dc22b9ffb2ef1ab809e5d3c4f324a0738a65579317ff2e",
            "9fe8c13e8a0ac0345195c5ba3183d0c2c8ad53480158e921a52c84661e985b72"
        ],
        "HostConfig": {
            "Binds": [
                "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\public:/wsc:rw",
                "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\docker\\nginx\\realip.conf:/etc/nginx/conf.d/realip.conf:rw",
                "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\docker\\nginx\\site.conf:/etc/nginx/conf.d/default.conf:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "wsc-dockerized_wsc-network",
            "PortBindings": {
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "80"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": [],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c3894fd9f7e5e45e0bc8905bd18d9cc26acfa2db915bc69e6c222f332a30038b-init/diff:/var/lib/docker/overlay2/8b28623c7f27876062dd0989e6381a605a333f76dd31acf11f604cc8b7bb9c7c/diff:/var/lib/docker/overlay2/2c402a558d5b9258bb51bc35b5994527bc5742e813cd43e1298f5c83daed69ed/diff:/var/lib/docker/overlay2/787b0f0e039110a99d220ac011611018dbc445bd7c1f91bdff73105ab708fd78/diff:/var/lib/docker/overlay2/7c20db8fe616874e40a309e317b17857bc444e35aaa53561687b7009532bb10f/diff:/var/lib/docker/overlay2/c5c0baa759b6594496848eef98a5a7b898c7f7730a17fc5a4244d019e0463948/diff:/var/lib/docker/overlay2/bf7b15fb9d0442aeda4a18bac68a6c892b0769dd88ea900fcbf7e7f6f05f510a/diff:/var/lib/docker/overlay2/a5db59056d4db81ad71222e70470090f056a63631cc3ab968b0cd5bd911e8bea/diff:/var/lib/docker/overlay2/1341892812e81c96e49a9613e20a2fbedbc60a91ac316b1ddf78862bbca10032/diff",
                "MergedDir": "/var/lib/docker/overlay2/c3894fd9f7e5e45e0bc8905bd18d9cc26acfa2db915bc69e6c222f332a30038b/merged",
                "UpperDir": "/var/lib/docker/overlay2/c3894fd9f7e5e45e0bc8905bd18d9cc26acfa2db915bc69e6c222f332a30038b/diff",
                "WorkDir": "/var/lib/docker/overlay2/c3894fd9f7e5e45e0bc8905bd18d9cc26acfa2db915bc69e6c222f332a30038b/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\docker\\nginx\\site.conf",
                "Destination": "/etc/nginx/conf.d/default.conf",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\docker\\nginx\\realip.conf",
                "Destination": "/etc/nginx/conf.d/realip.conf",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\public",
                "Destination": "/wsc",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "ee4d48a5c5d1",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.27.0",
                "PKG_RELEASE=2",
                "NJS_VERSION=0.8.4",
                "NJS_RELEASE=2"
            ],
            "Cmd": [
                "nginx",
                "-g",
                "daemon off;"
            ],
            "Image": "nginx:alpine",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "96991a13e05962ec858c37aa86c42ada774bf37c54d1f03d02070d1e2759d542",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.depends_on": "",
                "com.docker.compose.image": "sha256:70ea0d8cc5300acde42073a2fbc0d28964ddb6e3c31263d92589c2320c3ccba4",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "wsc-dockerized",
                "com.docker.compose.project.config_files": "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized\\docker-compose.yml",
                "com.docker.compose.project.working_dir": "C:\\Users\\phils\\Desktop\\Woltlab\\wsc-dockerized",
                "com.docker.compose.replace": "b9ee13e20ed1841b08081b987811a2b73c472cc31d7f5de6ab533728e1957d50",
                "com.docker.compose.service": "nginx",
                "com.docker.compose.version": "2.27.1",
                "maintainer": "NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e"
            },
            "StopSignal": "SIGQUIT"
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "b1282e660947845d51d50249817a84e72537c8ee5a3c495e497032df387a93d5",
            "SandboxKey": "/var/run/docker/netns/b1282e660947",
            "Ports": {
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "80"
                    }
                ]
            },
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "wsc-dockerized_wsc-network": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "wsc-dockerized-nginx-1",
                        "nginx"
                    ],
                    "MacAddress": "02:42:ac:13:00:04",
                    "NetworkID": "d8bf2274708977286d0b4e8f2f68aebd2fbdbec508a2df2430547845e35ffd01",
                    "EndpointID": "95112fd2717f24fb0292ae1bc9d0af40f430d151b407fe5ce26b86c951f327bb",
                    "Gateway": "172.19.0.1",
                    "IPAddress": "172.19.0.4",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DriverOpts": null,
                    "DNSNames": [
                        "wsc-dockerized-nginx-1",
                        "nginx",
                        "ee4d48a5c5d1"
                    ]
                }
            }
        }
    }
]
PS C:\Users\phils>
SoftCreatR commented 4 months ago

Der nginx baut die externen Verbindungen nicht auf, sondern PHP. Allerdings besteht das Problem in deinem Setup und hat nichts mit dem hier zu tun.

Versuch in der WSL-Maschine mal

sysctl -w net.ipv4.ip_forward=1

ps915 commented 4 months ago
PS C:\Users\phils\Desktop\Woltlab\wsc-dockerized> wsl
phil@desktop-phil:/mnt/c/Users/phils/Desktop/Woltlab/wsc-dockerized$ sudo sysctl -w net.ipv4.ip_forward=1
[sudo] password for phil:
net.ipv4.ip_forward = 1
phil@desktop-phil:/mnt/c/Users/phils/Desktop/Woltlab/wsc-dockerized$ ping woltlab.com
PING woltlab.com (62.113.233.136) 56(84) bytes of data.
64 bytes from s1.woltlab.com (62.113.233.136): icmp_seq=1 ttl=57 time=26.7 ms
64 bytes from s1.woltlab.com (62.113.233.136): icmp_seq=2 ttl=57 time=25.2 ms
64 bytes from s1.woltlab.com (62.113.233.136): icmp_seq=3 ttl=57 time=25.1 ms
64 bytes from s1.woltlab.com (62.113.233.136): icmp_seq=4 ttl=57 time=25.1 ms
64 bytes from s1.woltlab.com (62.113.233.136): icmp_seq=5 ttl=57 time=25.4 ms
^C
--- woltlab.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 25.051/25.484/26.682/0.608 ms
phil@desktop-phil:/mnt/c/Users/phils/Desktop/Woltlab/wsc-dockerized$

Schafft leider keine Abhilfe. Komisch ist aber, dass ein Ping in der Maschine aber erfolgreich ist!

ps915 commented 4 months ago

komischerweise wird dein Server gefunden:

image

Ebenso werden die letzten Woltlab Nachrichten angezeigt

image

SoftCreatR commented 4 months ago

Wie lautet denn die Fehlermeldung?

ps915 commented 4 months ago

404 not found.

Woltlab hat mir gerade mitgeteilt, dass die 6.1 nur für interne Zwecke ist und keinerlei Paketserverver dafür gibt. Ich habe das also nur den nackten Core, ohne Forum oder sonst was.

Da ich Plugins entwickeln möchte, bringt mir das natürlich nichts. Werde später Mal die 6.0 installieren, dann sollte glaube ich alles laufen. Dass der Container kein Internetzugang hat, ist natürlich nicht der Fall. Die fehlenden Paketserver haben mich wohl in die Irre geführt.