Docker 常用镜像分享

如无特殊说明,都是基于最新稳定版

nginx
docker run -itd -p 80:80 --name nginx nginx:1.22.1
# 配置文件目录  /etc/nginx/
Tomcat
docker run -itd -p 8080:8080 --name tomcat tomcat:9.0.73
## 配置目录 /usr/local/tomcat
Redis
docker run -itd -p 6379:6379  --name redis6  redis:6.2.6 --requirepass P@ssw0rd
RabbitMq
docker run -it  --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.11-management
# 默认账号密码 guest
# 配置文件目录 /etc/rabbitmq
MySQL
## 5.7.31
docker run -itd -p 3357:3306 -e TZ=Asia/Shanghai  --name mysql5.7  registry.cn-hangzhou.aliyuncs.com/jiuqi-bd/bud-mysql:5.7.31 --lower_case_table_names=1
## 8.0.22
docker run -itd -p 3380:3306 -e TZ=Asia/Shanghai  --name mysql8.0  registry.cn-hangzhou.aliyuncs.com/jiuqi-bd/bud-mysql:8.0.22 --lower_case_table_names=1  
## 配置文件 /etc/mysql/my.cnf
Oracle
docker run -d --name oracle-19c --restart=always -e ORACLE_SID=ORCL -e ORACLE_PDB=BUDGET 
-e ORACLE_PWD=123456 -p 1521:1521  -p  5500:5500 registry.cn-hangzhou.aliyuncs.com/it-boy/oracle19c:latest
## 创建数据库 (运行成功后需要等待一会。docker logs 查看进度 出现 XDB initialized.初始化完毕)
docker exec -it oracle-19c /bin/bash
sqlplus / as sysdba
alter session set container=BUDGET;
create user test identified by 123456;
grant dba,connect,resource,create view to test;
SQL Server
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -p 1433:1433 --name sqlserver2017 -d mcr.microsoft.com/mssql/server:2017-latest
## 创建数据库
docker exec -it sqlserver2017 /bin/bash
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "P@ssw0rd"
create database budget
go
## 账号 sa
DM8(达梦8)
docker run -itd -p 5236:5236 --name dm8 registry.cn-hangzhou.aliyuncs.com/jiuqi-bd/dm8  /bin/bash /startDm.sh
## 默认账号密码  sysdba
PostgreSQL
docker run  -itd --name postgres -e  POSTGRES_PASSWORD=P@ssw0rd -p 5432:5432  postgres:15.2
KKFileView
docker run -it -p 8012:8012 keking/kkfileview:4.1.0
浏览器访问容器8012端口 http://127.0.0.1:8012 即可看到项目演示用首页

你可能感兴趣的:(docker,容器,运维)