docker

//centos7安装docker-ce
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce
sytemctl enable docker
systemctl start docker

//mysql
docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=root -e TZ="Asia/Shanghai" -d mysql:5.5.62

//mongodb
docker pull mongo:3.7.9
docker run -itd --name mongo -p 27017:27017 mongo:3.7.9 --auth
docker exec -it mongo mongo admin
db.createUser({ user:'admin',pwd:'123456',roles:[ { role:'userAdminAnyDatabase', db: 'admin'}]});
db.auth('admin', '123456')
db.createUser({ user:'yapi_user',pwd:'1',roles:[ { role:'readWrite', db: 'yapi'}]});

//nginx
docker run -p 80:80 --name nginx -v /home/shan/dev/nginx/docker-volume/log:/var/log/nginx -v /home/shan/dev/nginx/docker-volume/conf/nginx.conf:/etc/nginx/nginx.conf -v /home/shan/dev/nginx/docker-volume/conf.d:/etc/nginx/conf.d -v /home/shan/dev/nginx/docker-volume/html:/usr/share/nginx/html -d nginx:1.16.1

//shadowsocks
docker run -e PASSWORD=111111 -p 400:8388 --name ss -d shadowsocks/shadowsocks-libev

//transmission
docker create  -p 9091:9091 -p 51413:51413 -e USER=username -e PASS=password -v ~/bt:/downloads --name=transmission --restart linuxserver/transmission

// seafile
docker run -d --name seafile -e SEAFILE_SERVER_HOSTNAME=192.168.1.105  -v /seafile_data:/shared  -p 8888:80  seafileltd/seafile:6.3.4

//nexus3
docker run -d -p 8081:8081 -p 8082:8082 -p 8083:8083 --name nexus  sonatype/nexus3

//centos
docker run -d --name my_centos --privileged centos:7.7.1908 /sbin/init
docker exec -i -t my_centos /bin/bash

//修改时区
mv /etc/localtime /etc/localtime.bak
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

//alpine修改时区
apk add tzdata
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone

//阿里云镜像
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache

//centos 安装中文
yum install kde-l10n-Chinese

//创建网络
docker network create my_net
docker run -d --name my_centos --privileged --network my_net --network-alias my_centos centos:7.7.1908 /sbin/init

//发布镜像
sudo docker commit -m="test" -a="sjl" 0a02eb76bd96 dmshan88/test_zabbix_agent:v1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值