使用Traefik,我有一个https后端,它是一个以https模式运行webpack devserver的docker容器-即devserver正在生成一个自签名的ssl证书。
访问时我得到x509:证书对127.0.0.1有效,但对#backendContainerIP#有效。
我尝试在Traefik服务上设置标签'traefik.frontend.auth.forward.tls.insecureSkipVerify=true
',希望它会忽略证书的有效性,但是没有用。
以下是撰写文件中的相关摘录:-
traefik:
image: traefik:1.7.8-alpine
command: --docker --logLevel=DEBUG
ports:
- 86:443
volumes:
- <traefikConfigFilePath>:/traefik.toml
- <traefikAcmeFilePath>:/acme.json
- /var/run/docker.sock:/var/run/docker.sock
labels:
- traefik.frontend.auth.forward.tls.insecureSkipVerify=true
networks:
- <dockerNetwork>
container_name: traefik
depends_on:
- portal
portal:
build: <github link>
expose:
- <portalPort>
labels:
- traefik.backend=portal
- traefik.enable=true
- traefik.docker.network=<dockerNetwork>
- traefik.port=<portalPort>
- traefik.protocol=https
- traefik.frontend.rule=PathPrefixStrip:/
networks:
- <dockerNetwork>
这是相关的toml文件
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address=":80"
[entryPoints.http.redirect]
entryPoint="https"
[entryPoints.https]
address=":443"
[entryPoints.https.tls]
[acme]
email=<emailaddress>
storage="acme.json"
entryPoint="https"
onHostRule=true
onDemand=false
acmeLogging=true
[docker]
endpoint = "unix:///var/run/docker.sock"
watch = true
exposedByDefault = false
任何帮助将不胜感激。谢谢,
答案 0 :(得分:0)
我可以通过在toml的顶级添加"engines": {
"yarn": ">= 1.0.0"
},
来使其正常工作,如下所示:-
toml文件:-
insecureSkipVerify= true
找到那个真是太痛苦了!