ssl - 在 Synology NAS 上使用 Docker 在 GitLab 上启用 SSL

我在 Docker 容器中通过 Synology NAS (DSM 5.2) 上的官方 GitLab 包安装了 GitLab。

我现在喜欢通过 https 而不是 http 访问 Web 界面。我在几篇文章中看到可以使用一些 docker 魔术,但是 没有找到任何详细的说明。

谁能解释一下如何做到这一点?

可惜这不是默认的。

最佳答案

使用 DSM6,现在可以使用 dsm docker 界面进行更改(证书生成除外):

1) 创建 key /证书:

mkdir /volume1/docker/gitlab/certs
cd /volume1/docker/gitlab/certs
openssl genrsa -out gitlab.key 2048
openssl req -new -key gitlab.key -out gitlab.csr
openssl x509 -req -days 3650 -in gitlab.csr -signkey gitlab.key -out gitlab.crt
openssl dhparam -out dhparam.pem 2048
chmod 400 gitlab.key

2) 搭建gitlab docker环境:

3) 设置 gitlab docker 端口绑定(bind):

https://stackoverflow.com/questions/31791247/

相关文章:

python - 如何在构建过程中安装私有(private) Python 包

docker - 如何在 Docker 内的 Jenkins 中运行 Katalon 测试套件

docker - 使用 pyodbc 将 docker python 连接到 SQL 服务器

node.js - 为什么 NPM 在 Docker 容器中不可用

docker - Artifactory 作为 docker 注册表

macos - 无法从 docker 容器访问本地网络 IP

docker - 如何用 nix 构建一个 docker 容器?

docker - 为什么 Kubernetes 源代码比其他容器编排器大一个数量级?

docker - 如何在 Docker 中将卷从容器挂载到主机?

git - 何时从 Docker 存储库中提取,何时从 Git 存储库中提取然后构建?