From 2a4c7cf815e4ca1a0455c5d4759dfb509b353e58 Mon Sep 17 00:00:00 2001 From: wangzixiang <17839623189@163.com> Date: Wed, 5 Jun 2024 10:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7140e03..6af2ea3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,13 @@ ## 凭证 使用密钥登录,请提前将运行的用户的凭证放到远程服务器上(ssh-copy-id) +可以先启动容器后在容器内部使用 +``` +ssh-copy-id -p 222 user@host + +# 若构建镜像时没有生成密钥凭证可先生成(容器内部执行) +ssh-keygen -t rsa -b 4096 -N "" -f /root/.ssh/id_rsa +``` ## 构建 ``` @@ -30,5 +37,6 @@ services: REMOTE_LISTEN_PORT: 需要转发的服务器端口 LOCAL_LISTEN_PORT: 本地监听端口 LOCAL_LISTEN_HOST: 本地监听地址 - restart: always + stdin_open: true + tty: true ```