Stunnel Docker image based on Alpine Linux.
- Run as non-root user
- Multi-platform image
- linux/amd64
- linux/arm64
- linux/arm/v7
This docker can be used with an existing stunnel
configuration using a volume (/etc/stunnel
).
Otherwise you can just adapt the environment variables to run a simple configuration.
Docker compose is the recommended way to run this image. Edit the compose file with your preferences and run the following command:
git clone https://github.com/k44sh/stunnel.git && cd stunnel
mkdir stunnel
docker compose up -d
docker compose logs -f
You can also use the following minimal command:
docker run --rm -d --name stunnel -p 389:389 \
-e CONNECT_HOST=ldap.google.com -e CONNECT_PORT=636 \
-v $(pwd)/stunnel.crt:/etc/stunnel/stunnel.crt \
-v $(pwd)/stunnel.key:/etc/stunnel/stunnel.key \
k44sh/stunnel:latest
TZ
: The timezone assigned to the container (defaultUTC
)PUID
: User id (default1000
)PGID
: User group id (default1000
)LISTEN_HOST
: Listening server address (default0.0.0.0
)LISTEN_PORT
: Listening server port (default389
)CONNECT_HOST
: Remote server address (defaultldap.google.com
)CONNECT_PORT
: Remote server port (default636
)HEALTHCHECK
: Host for healthcheck (default127.0.0.1
)
To upgrade, pull the newer image and launch the container:
docker compose pull
docker compose up -d