Skip to content

Conversation

@caronc
Copy link
Owner

@caronc caronc commented Feb 18, 2025

Description:

Related issue (if applicable): refs #211

Added 2 new environment variables that allow the exclusive enforcing of an IPv4 or IPv6 environment only.

  • IPV4_ONLY: Eliminate any IPv6 configuration in place to run n an exclusive IPv4 mode
  • IPV6_ONLY: Eliminate any IPv4 configuration in place to run in an exclusive IPv6 mode

For obvious reasons, it's ambigious to set both environment variables, so if this is detected, nothing is updated/changed within the docker environment.

E.g.:

# Enforces an IPv4 environment only:
docker run --name apprise 
   -p 8000:8000 \
   -e PUID=$(id -u) \
   -e PGID=$(id -g) \
   -e IPV4_ONLY=y \
   -e APPRISE_STATEFUL_MODE=simple \
   -e APPRISE_WORKER_COUNT=1 \
   -d caronc/apprise:latest

In the example, i set the IPV4_ONLY to y, but really it doesn't matter what you equate the environment variable too. As long as it has been defined, it will trigger the enforcing code of the respeced IP version.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • Tests added

@caronc caronc linked an issue Feb 18, 2025 that may be closed by this pull request
@caronc caronc merged commit 4c038de into master Feb 18, 2025
1 check passed
@caronc caronc deleted the 211-IPv4-IPv6-control branch November 29, 2025 02:27
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

Successfully merging this pull request may close these issues.

Container fails to start properly if IPv6 disabled

2 participants