You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the container image to start the smtp4dev server.
I don't want to use privileged ports, even within the container, so i changed the ports for alll services.
I'm using environment Variables to configure the ports, which works well for the SMTP and IMAP port, but not for the HTTP port.
Most of the time, the server starts with the default HTTP port 80.
Console Output:
[...]
Overriding HTTP_PORTS '80' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:80'.
Now listening on: http://[::]:80
Sometimes it actually starts with the configured port 5000.
Console Output:
[...]
Overriding HTTP_PORTS '80' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:5000'.
Now listening on: http://[::]:5000
For some statistics i started and stopped the container 20 times with the following docker command:
In total the HTTP Server started 12 times with port 80 and 8 times with port 5000.
This only happens when i use the ServerOptions__Urls environment variable. When i use the cli parameter --urls, it works as intended 100% of the time.
For example with this command:
clear; docker run -it --rm \
-p 5000:5000 \
-p 2525:2525 \
-e ServerOptions__Port=2525 \
-e ServerOptions__ImapPort=2143 \
"rnwood/smtp4dev:3.6.0" \
--urls "http://*:5000"
[...]
Overriding HTTP_PORTS '80' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:5000'.
Now listening on: http://[::]:5000
The text was updated successfully, but these errors were encountered:
I found that when running the (Linux) docker container, you need to define it in all caps (eg SERVEROPTIONS__URLS=http://*:8080) because the env var is already defined in all caps in the image itself
I'm using the container image to start the smtp4dev server.
I don't want to use privileged ports, even within the container, so i changed the ports for alll services.
I'm using environment Variables to configure the ports, which works well for the SMTP and IMAP port, but not for the HTTP port.
Most of the time, the server starts with the default HTTP port 80.
Console Output:
Sometimes it actually starts with the configured port 5000.
Console Output:
For some statistics i started and stopped the container 20 times with the following docker command:
In total the HTTP Server started 12 times with port 80 and 8 times with port 5000.
This only happens when i use the
ServerOptions__Urls
environment variable. When i use the cli parameter--urls
, it works as intended 100% of the time.For example with this command:
The text was updated successfully, but these errors were encountered: