I'm having an issue adding SSL certificate to Keycloak that is running on docker. I got an SSL Certificate from AWS EC2 with Load Balancer, but don't know how to add it to Keycloak on docker. I was looking through Google but nothing found yet.
Also when i go to page like: https://stackoverflow.com, the ssl works perfectly. But when I try to open https://stackoverflow.com:8443 (since 8443 is the port of Keycloak) its not working.
Here's the code of Dockerfile of Keycloak:
FROM jboss/keycloak:4.6.0.Final
WORKDIR /opt/jboss/keycloak
COPY realm-export.json /opt/jboss/keycloak/
EXPOSE 8443
ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]
CMD ["-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-Dkeycloak.import=realm-export.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING"]
And here's the docker-compose.yml file:
version: '2'
services:
keycloak:
build: "./Keycloak + actibook-app client import"
depends_on:
- keycloak-postgres
environment:
- KEYCLOAK_USER=${KEYCLOAK_USER}
- KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}
- KEYCLOAK_IMPORT=${KEYCLOAK_IMPORT}
- POSTGRES_USER=${KEYCLOAK_DATABASE_USER}
- POSTGRES_PASSWORD=${KEYCLOAK_DATABASE_PASSW}
- POSTGRES_PORT_5432_TCP_ADDR= keycloak-postgres
ports:
- "8443:8443"
labels:
- "traefik.frontend.passHostHeader=true"
traefik:
build: ./traefik
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped