小编Kar*_*son的帖子

在内部公开 Docker 端口

我想运行一个 Docker 容器,它只在所述主机上的 docker 实例中内部公开它的端口。这意味着我不希望它公开。

如何从命令行执行此操作?下面的代码公开打开它。

docker run -p 27017:27017 --name mongo mongo
Run Code Online (Sandbox Code Playgroud)

docker

6
推荐指数
1
解决办法
4294
查看次数

具有 ssh-copy-id 功能的 Android 应用

正如标题所说,我想将我的 ssh 密钥复制到服务器,然后出于安全原因禁用 root 密码登录。

我正在使用 JuiceSSH,但它似乎缺少免费版本的 ssh-copy-id。

任何支持此命令的应用程序?

ssh android ssh-keys

5
推荐指数
1
解决办法
1682
查看次数

为任何用户在 Dockerfile 中的 debian stretch 中设置语言环境

RUN apt-get update && \
    # Install locales
    apt-get install -y locales && \
    # Set locale
    sed --in-place '/en_US.UTF-8/s/^# //' /etc/locale.gen && \
    locale-gen && \
    # Set system locale (add line)
    echo "export LANG=en_US.UTF-8" >> /etc/profile && \
    # Set system timezone (add line)
    echo "export TZ=UTC" >> /etc/profile && \
    # If the user will not change, we must source
    source /etc/profile
Run Code Online (Sandbox Code Playgroud)

我在 GitLab 管道中使用该图像,并显示以下内容:

$ cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell …
Run Code Online (Sandbox Code Playgroud)

debian locale docker

2
推荐指数
1
解决办法
6204
查看次数

标签 统计

docker ×2

android ×1

debian ×1

locale ×1

ssh ×1

ssh-keys ×1