Docker Community Forums

Share and learn in the Docker community.

How do I serve https pages using docker EE?

I have a simple test app going and I can hit it in a single docker container using self-signed certs and https, everything I have tried in Docker EE fails. I am wondering what the https requirements are for EE setup specifically?

OS version: ubuntu 18.04 LTS manager nodes, latest server 2019 builds in latest DOCKER EE
Steps to reproduce: run compose file in EE

compose file:
version: ‘3.7’

services:

tlsapp:
image: millian32/tlsapp
hostname: tlsapp
environment:
- ASPNETCORE_HTTPS_PORT=6061
- ASPNETCORE_URLS=https://+;http://+
- Kestrel__Certificates__Default__Path=C:\pfx\tlstest.pfx
- Kestrel__Certificates__Default__Password=Imagine8
ports:
- target: 443
published: 6061
protocol: tcp
mode: host
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.platform.os == windows
- node.role == worker
- node.labels.vm == 2
volumes:
- pfx-volume:C:/pfx/:rw

volumes:
pfx-volume: {}

I have also tried using port mappings like ports: “6061:443” , no host mode.

I am using swarm, with layer 7 routing on and the default issued self-signed certs in EE. LDAP is off, network is an overlay without ipv6. Https port for external traffic is 8443.

I also have a hybrid swarm with ubuntu Linux manager nodes and windows server 2019 worker nodes. So I can use about any tech stack to figure it out… I see port 8443 is the https port for external traffic, maybe my problem is somewhere in there??

Thanks,

Max