Docker安装(CentOS)+简单使用

Docker安装(CentOS)

一键卸载旧的

sudo yum remove docker*

一行代码(自动安装)

使用官方安装脚本

复制代码
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

启动 docker并查看状态

运行镜像 hello-world

docker run hello-world

简单使用

使用 docker run 命令

在容器内运行一个应用程序比如: docker run hello-world

安装node

docker pull node:latest

docker images

运行node容器

复制代码
docker run -itd --name node-test node

进入容器

复制代码
docker exec -it node-test /bin/bash
相关推荐
Zhu7581 小时前
离线二进制部署-Kubernetes-v1.36.4
容器·贪心算法·kubernetes
谢亮_vipxieliang2 小时前
镜像安全:扫描、签名与软件供应链
安全·docker
天衍四九-3 小时前
Docker容器实战系列(八):Docker生产最佳实践与避坑指南,系列终章
运维·docker·容器
Zhou1411365 小时前
Docker_03_DockerCompose多容器编排
运维·docker·容器
啊哈一半醒6 小时前
Docker 底层知识:从 Namespace 到 UnionFS
运维·docker·容器
fruge9 小时前
飞牛OS部署Flare导航页:Docker Compose、YAML书签配置与cpolar公网访问
运维·docker·容器
Zhou1411369 小时前
Docker_02_Dockerfile与存储网络
网络·docker·容器
Dragon~Snow10 小时前
Linux server CentOS stream 10系统构建
linux·运维·centos
guo_wen_qiang12 小时前
云服务器elasticsearch环境搭建-单台
运维·elasticsearch·容器
晨陌y12 小时前
CentOS 7 部署 mysqld_exporter:MySQL 指标采集、Prometheus 告警与远程监控
mysql·centos·prometheus