1

I have the following compose file:

version: "3"        
services:
    wordpress:
        image: visiblevc/wordpress
        privileged: true
        network_mode: bridge #should help?
        # required for mounting bindfs
        cap_add:
            - SYS_ADMIN
        devices:
            - /dev/fuse
        # required on certain cloud hosts
        security_opt:
            - apparmor:unconfined
        ports:
            - 8080:80
            - 8081:443
      ...WP parameters ommitted for brewity

When I run it, I get the following error:

enter image description here

When I use the CLI and curl the SAME url, I can download the information.

enter image description here

What should I change in the yaml to make it work automatically?

UPDATE:

As curl works manually, I don't think it as a DNS resolve error, but to make sure, I modified the resolv.conf file to a valid nameserver address:

enter image description here

Unfortunately, it didn't solve the issue.

Nestor
  • 8,194
  • 7
  • 77
  • 156
  • This is DNS issue. https://stackoverflow.com/questions/44082832/curl-error-28-resolving-timed-out-after-5001-milliseconds – vsergi May 20 '22 at 10:06
  • @vsergi If it is a DNS issue, then curl would fail when using manually. I checked, curl can resolve any address when using in CLI. – Nestor May 20 '22 at 12:47
  • Yes, you are right.... Still, the message in the console is related to DNS resolution issue...But it does not make much sense then... – vsergi May 20 '22 at 14:55

2 Answers2

1

Try to put on image this:

image: visiblevc/wordpress:latest

You need to specify the tag.

euTIMER
  • 681
  • 3
  • 12
0

We checked the initialization shell script of the Docker image. We couldn't determine why the resolve fails when wp core download was called so we created a workaround.

We added a pre-init section inside the script to use the explicit curl commands that worked as demonstrated in the CLI. As a sideeffect, we download the necessary files so it bypasses the need of downloading and the potential resolve timeout. Note: we needed several curl calls for the API as the resolve kept failing after only one call.

This is how the new script starts:

h1 Pre-init
    curl "https://api.wordpress.org/core/version-check/1.7/?locale=en_US" >/dev/null
    curl "https://downloads.wordpress.org/release/wordpress-5.9.3.zip" --output wordpress-5.9.3.zip
    curl "https://api.wordpress.org/core/version-check/1.7/?locale=en_US" >/dev/null
    curl "https://downloads.wordpress.org/plugin/classic-editor.1.6.2.zip" --output classic-editor.1.6.2.zip
    curl "https://downloads.wordpress.org/translation/core/5.9.3/hu_HU.zip" --output hu_HU.zip    
    curl "https://api.wordpress.org/core/version-check/1.7/?locale=en_US" >/dev/null
h1 'Begin WordPress Installation'

Using this script, the installation succeeded.

Nestor
  • 8,194
  • 7
  • 77
  • 156