0
docker内部安装软件
source link: https://fightinggg.github.io/RF3QFO.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
以哪个镜像作为基础镜像
docker run -it --rm centos:centos8
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -L -o /etc/yum.repos.d/CentOS-Base.repo \
&& yum clean all \
&& yum makecache
安装Git
yum 安装
yum install git -y
二进制安装
安装Clang
yum安装
yum install clang -y
二进制安装
```
# 安装SSH
## yum安装
```shell
yum install openssh-server openssh-clients passwd -y \
&& sed -i "s/^UsePAM yes/UsePAM no/g" /etc/ssh/sshd_config \
&& echo 123456 | passwd root --stdin \
&& ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa \
&& cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys \
&& chmod 0600 ~/.ssh/authorized_keys \
&& ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key \
&& ssh-keygen -q -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key \
&& ssh-keygen -q -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key
/usr/sbin/sshd
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK