Docker学习之基于CentOS7.8.2003基础镜像下nginx-rtmp-ffmpeg流服务镜像创建

基于CentOS7.8.2003基础镜像下nginx-rtmp-ffmpeg流服务镜像创建

Docker CentOS 镜像容器启动

启动Docker Engine
[root@VM-0-8-centos /]# systemctl start docker
列出CentOS系统镜像列表
[root@VM-0-8-centos /]# docker search centos
NAME                              DESCRIPTION                                    STARS  OFFICIAL  AUTOMATED
centos                            The official build of CentOS.                  6149    [OK]
ansible/centos7-ansible           Ansible on Centos7                             132                [OK]
consol/centos-xfce-vnc            Centos container with "headless" VNC session…  119                [OK]
jdeathe/centos-ssh                OpenSSH / Supervisor / EPEL/IUS/SCL Repos - …  115                [OK]
centos/systemd                    systemd enabled base container.                87                 [OK]
centos/mysql-57-centos7           MySQL 5.7 SQL database server                  81
imagine10255/centos6-lnmp-php56   centos6-lnmp-php56                             58                 [OK]
tutum/centos                      Simple CentOS docker image with SSH access     47
centos/postgresql-96-centos7      PostgreSQL is an advanced Object-Relational …  46
kinogmt/centos-ssh                CentOS with SSH                                29                 [OK]
pivotaldata/centos-gpdb-dev       CentOS image for GPDB development. Tag names…  12
guyton/centos6                    From official centos6 container with full up…  10                 [OK]
centos/tools                      Docker image that has systems administration…  6                  [OK]
drecom/centos-ruby                centos ruby                                    6                  [OK]
pivotaldata/centos                Base centos, freshened up a little with a Do…  5
pivotaldata/centos-gcc-toolchain  CentOS with a toolchain, but unaffiliated wi…  3
darksheer/centos                  Base Centos Image -- Updated hourly            3                  [OK]
pivotaldata/centos-mingw          Using the mingw toolchain to cross-compile t…  3
mamohr/centos-java                Oracle Java 8 Docker image based on Centos 7   3                  [OK]
mcnaughton/centos-base            centos base image                              1                  [OK]
blacklabelops/centos              CentOS Base Image! Built and Updates Daily!    1                  [OK]
indigo/centos-maven               Vanilla CentOS 7 with Oracle Java Developmen…  1                  [OK]
pivotaldata/centos6.8-dev         CentosOS 6.8 image for GPDB development        0
pivotaldata/centos7-dev           CentosOS 7 image for GPDB development          0
smartentry/centos                 centos with smartentry                         0                  [OK]
拉取CentOS镜像(这里我拉取得是CentOS 7.8.2003)
[root@VM-0-8-centos /]# docker pull centos:7.8.2003
Using default tag: latest
latest: Pulling from library/centos
3c72a8ed6814: Pull complete 
Digest: sha256:76d24f3ba3317fa945743bb3746fbaf3a0b752f10b10376960de01da70685fbd
Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest
启动CentOS 7.8.2003镜像容器
[root@VM-0-8-centos /]# docker run -it -d -p 11935:1935 -p 180:80 -p 1443:443 centos:7.8.2003 bash
be7b7f9c83a79b2a8ec2cb6a2fbab5a09e1ee04e0ea587bcc25419a6ffd593b9
查看运行中容器并进入
[root@VM-0-8-centos /]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                                                 				NAMES
34091d225d00        7e6257c9f8d8        "bash"              29 minutes ago      Up 29 minutes       0.0.0.0:180->80/tcp, 0.0.0.0:1443->443/tcp, 0.0.0.0:11935->1935/tcp   inspiring_matsumoto
[root@VM-0-8-centos /]# docker exec -it 34091d225d00 bash
查看系统版本
[root@34091d225d00 /]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
停止Docker容器
docker stop [CONTAINER ID]

安装ffmpeg

注: 此 ffmp

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值