当前位置:网站首页>Install mysql, MSSQL, Oracle, mongdb and redis collections in docker
Install mysql, MSSQL, Oracle, mongdb and redis collections in docker
2022-04-21 19:57:00 【A grain of sand in the sea】
1、linux Install in docker、docker-compose On the premise of
2、docker-compose The contents of the document
version: '3.8'
services:
# The service name
sqlserver-db:
restart: always
# Container name
container_name: sqlserver-db
# Image name
image: microsoft/mssql-server-linux:latest
# Port mapping
ports:
- 1433:1433
# mount
volumes:
- /data/mssql:/var/opt/mssql/data
# environment variable
environment:
- ACCEPT_EULA=Y
#SA The user password must be at least 8 Characters , And contains three of the following four groups of characters : Capital 、 Lowercase letters 、10 Bit cardinality and sign
- SA_PASSWORD=root@1234
mysql-db:
privileged: true
image: docker.io/mysql:latest # The image used
restart: always
container_name: mysql-db # Container name
volumes:
- /data/mysql:/var/lib/mysql # Mount Directory , Persistent storage
ports:
- 3306:3306
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root@1234 # Set up root User's password
redis:
# Mirror name If you need to specify a version Just put : Replace with version number later
image: redis:latest
# Container name
container_name: redis
# Restart strategy
restart: always
# Port mapping
ports:
- 6379:6379
volumes:
# Profile mapping
- /data/redis/redis.conf:/usr/local/etc/redis/redis.conf
- /data/redis/data/redisata:/data
- /etc/localtime:/etc/localtime:ro
# Additional configuration Passwords and so on
command: ["redis-server", "--appendonly", "yes", "--requirepass","root@1234"]
oracle-db:
hostname: oracle-db
image: sath89/oracle-xe-11g:latest
restart: always
container_name: oracle-db
expose:
- 1521
privileged: true
environment:
- TZ=Asia/Shanghai
- DOCKER_CLIENT_TIMEOUT=120
- COMPOSE_HTTP_TIMEOUT=120
- ORACLE_PDB=system # Default database
- ORACLE_PWD=oracle #oracle system User's password
- ORACLE_CHARACTERSET=AL32UTF8
volumes:
- /data/oracle-11g/data:/u01/app/oracle
ports:
- 1521:1521
mongo-db:
image: mongo:latest # choice mongodb edition
container_name: mongo-db
restart: always # Self starting
ports:
- 27017:27017 # Mapping host port
volumes:
- /data/mongo/data/db:/data/db # Mount the data file , Modify according to the actual path : The path ahead
- /data/mongo/data/log:/var/log/mongodb # Mount log files , Modify according to the actual path : The path ahead
- /data/mongo/data/config:/etc/mongo # Mount profile , Modify according to the actual path : The path ahead
portainer:
image: docker.io/portainer/portainer:latest
container_name: portainer
command: -H unix:///var/run/docker.sock
restart: always
ports:
- 9000:9000
- 8000:8000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/portainer/portainer_data:/data
2、 Name the file docker-compose.yaml file
docker-compose up -d
版权声明
本文为[A grain of sand in the sea]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211953504991.html
边栏推荐
猜你喜欢

Mysql错误2005
![[netty] is it difficult to implement a redis client by yourself?](/img/02/a9609465d2cc90251168b2ed0b94f0.png)
[netty] is it difficult to implement a redis client by yourself?

企业跨境电商平台服务解决方案,跨境电子商务贸易业务框架搭建运维

码出高效 第七章 并发与多线程

Interesting souls are the same. It takes only 2 steps to slide the computer off

危化品企业双预防机制数字化建设综合解决方案

Enterprise cross-border e-commerce platform service solution, cross-border e-commerce trade business framework construction, operation and maintenance
![[2021] number of effective sequences programmed by Tencent autumn recruitment technology post](/img/c2/1246796e2e1e228426788230d0e8ec.png)
[2021] number of effective sequences programmed by Tencent autumn recruitment technology post

数商云:剖析企业采购管理的现状,推进企业采购模式优化升级

【Gradle】问题解析+下载安装+环境配置+验证安装
随机推荐
高端制造业企业信息化解决方案,工业电商平台设备、数据、体系预测性维护
第九届”大唐杯“全国大学生移动通信5G技术大赛省赛获奖名单公示
redis
你的独立站转化率低?三个小技巧帮助提高转化率
Flinkx deployment
auto 关键字的使用
野路子玩Qt,第三十一集,擦玻璃游戏
快速排序的三种实现方式
High end manufacturing enterprise informatization solution, predictive maintenance of industrial e-commerce platform equipment, data and system
05. Prototype mode
PMP考试这些答题思路,你都掌握了吗?
R语言数据分析从入门到高级:(八)数据清洗技巧之数据格式转换(包含宽数据与长数据之间的转换)
flink中checkpoint机制随笔
【2021】腾讯秋招技术岗编程 有效序列的数量
Discussion on the hot and cold issues of open source license grounding gas
【Gradle】问题解析+下载安装+环境配置+验证安装
Interesting souls are the same. It takes only 2 steps to slide the computer off
ROS知识:如何实现相机接入
杰理之VDDIO_SYSVDD_DCDC14系统电压配置说明【篇】
接口非幂等性解决