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

Wordpress APACHE_HTTPS_PORT_NUMBER: privileged port requested #52990

Closed
dpd73 opened this issue Nov 17, 2023 · 2 comments
Closed

Wordpress APACHE_HTTPS_PORT_NUMBER: privileged port requested #52990

dpd73 opened this issue Nov 17, 2023 · 2 comments
Assignees
Labels
solved tech-issues The user has a technical issue about an application triage Triage is needed wordpress

Comments

@dpd73
Copy link

dpd73 commented Nov 17, 2023

Name and Version

bitnami/wordpress:6

What architecture are you using?

arm64

What steps will reproduce the bug?

  1. As per https://github.com/bitnami/containers/tree/main/bitnami/wordpress#tldr
    curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/wordpress/docker-compose.yml > docker-compose.yml
  2. Add APACHE_HTTPS_PORT_NUMBER=443 as an environment option for wordpress
  3. docker compose up -d
    (I've ignored setting up certs, changing the mapped port, etc. This is just highlighting the issue.)

What is the expected behavior?

The wordpress container comes up with apache listening on 443

What do you see instead?

INFO  ==> 
INFO  ==> Welcome to the Bitnami wordpress container
INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
INFO  ==> 
INFO  ==> ** Starting WordPress setup **
ERROR ==> An invalid port was specified in the environment variable APACHE_HTTPS_PORT_NUMBER: privileged port requested.

APACHE_HTTPS_PORT_NUMBER: privileged port requested

Additional information

This is related to #989 specifically point 2 here: #989 (comment)

https://github.com/bitnami/containers/blob/main/bitnami/wordpress/6/debian-11/prebuildfs/opt/bitnami/scripts/libvalidations.sh#L183 includes

        elif [[ "$unprivileged" = 1 && "$value" -lt 1024 ]]; then
            echo "privileged port requested"
            return 3
        fi

limiting the ports available. Why?

@dpd73 dpd73 added the tech-issues The user has a technical issue about an application label Nov 17, 2023
@github-actions github-actions bot added the triage Triage is needed label Nov 17, 2023
@dpd73
Copy link
Author

dpd73 commented Nov 17, 2023

Ahhh, I see, it's due to the non-root container business...

I'm running a local dev-setup, so running as root fixes things.

Thus, for anyone scratching there heads over this in the future:

  wordpress:
    image: docker.io/bitnami/wordpress:6
    user: root        < -------------------- add this
    extra_hosts:
      yoursite.com: 127.0.0.1     <----resolves loopback issue in site health, important for crons
    ports:
      - '8090:8080'
      - '9443:443'
    volumes:
      - '/Users/your/path/to/data:/bitnami/wordpress'
      - '/Users/your/path/to/certs:/certs'
    depends_on:
      - mariadb
    environment:
      - APACHE_HTTPS_PORT_NUMBER=443
      - WORDPRESS_DATABASE_HOST=xxx
      - WORDPRESS_DATABASE_PORT_NUMBER=3306
      - WORDPRESS_DATABASE_USER=xxx
      - WORDPRESS_DATABASE_PASSWORD=xxx
      - WORDPRESS_DATABASE_NAME=xxx
      - WORDPRESS_SKIP_BOOTSTRAP=yes

@dpd73
Copy link
Author

dpd73 commented Nov 5, 2024

Update, you don't have to run as root user, just use a non-privileged port

i.e. (trimmed compose file from above)

  wordpress:
    image: docker.io/bitnami/wordpress:6
    ports:
      - '8090:8080'
      - '9443:8443'
    environment:
      - APACHE_HTTPS_PORT_NUMBER=8443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved tech-issues The user has a technical issue about an application triage Triage is needed wordpress
Projects
None yet
Development

No branches or pull requests

2 participants