CentOS安装Docker

Centos中安装Docker及Docker的使用 在Centos7系统中安装指定版本的Docker,及Docker常用命令 阅读详情

官方安装文档

前提条件

操作系统要求

CentOS 7或8的维护版本,不支持或未测试存档版本。
启用centos-extras库,默认情况下,此存储库是启用的,但是如果已禁用它,则需要 重新启用它。

overlay2建议使用存储驱动程序。

使用存储库安装

首次安装Docker之前,需要设置Docker存储库。

设置存储库
安装yum-utils软件包(提供yum-config-manager 实用程序)并设置稳定的存储库。

sudo yum install -y yum-utils

#阿里云源地址
sudo yum-config-manager \
    --add-repo \
    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装

1.安装最新版本的Docker和容器,或跳过此步骤用下一步安装指定版本

sudo yum install docker-ce docker-ce-cli containerd.io

2.安装指定版本的Docker
列出并排序您存储库中可用的版本

yum list docker-ce --showduplicates | sort -r

在这里插入图片描述
版本列表取决于启用的存储库和CentOS版本

#例如安装版本为18.09.1
# sudo yum install docker-ce-18.09.1 docker-ce-cli-18.09.1 containerd.io
sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io

3.启动

sudo systemctl start docker
#设置开机启动
sudo systemctl enable docker 

查看docker版本

docker version

在这里插入图片描述
4.运行hello-world 映像来验证是否正确安装了Docker

sudo docker run hello-world

卸载Docker

1.卸载Docker,CLI和Containerd软件包

sudo yum remove docker-ce docker-ce-cli containerd.io

2.Images, containers, volumes或自定义配置文件不会自动删除。要删除所有Images, containers, volumes

sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

镜像加速

七牛云加速器:https://reg-mirror.qiniu.com
对于使用 systemd 的系统,在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件)

{"registry-mirrors":["https://reg-mirror.qiniu.com/"]}

重新启动服务

sudo systemctl daemon-reload

sudo systemctl restart docker

Docker基本命令

1.镜像命令
镜像:相当于应用的安装包,在Docker部署的任何应用都需要先构建成为镜像

#搜索镜像
docker search 镜像名称 
#拉取镜像
docker pull 镜像名称 
#查看本地所有镜像
docker images 
#删除镜像
docker rmi -f 镜像名称 
#如:拉取jdk1.8
docker pull openjdk:8-jdk-alpine

2.容器命令
容器:容器是由镜像创建而来,容器是Docker运行应用的载体,每个应用都分别运行在Docker的每个容器中

#运行容器(默认是前台运行)
docker run -i 镜像名称:标签 
#查看运行的容器
docker ps 
#查询所有容器
docker ps -a 

常用的参数:
-i:运行容器
-d:后台守方式运行(守护式)
–name:给容器添加名称
-p:公开容器端口给当前宿主机
-v:挂载目录

#启动/停止/重启容器
docker start/stop/restart 容器名称/ID 
#删除容器
docker rm -f 容器名称/ID 
Docker概述及CentOS安装Docker 阅读详情

相关推荐

K230开发板实战:YOLOv8n模型部署全流程(附常见报错解决方案)

本文详细介绍了在K230开发板上部署YOLOv8n模型的完整流程,包括模型选型、配置文件优化和运行时调优。特别针对常见的'生成部署文件异常'等问题提供了实用解决方案,帮助开发者高效完成嵌入式AI模型的部署与优化。

g8f9d0s1a2的博客 1046

CentOS安装Docker(超详细)

Docker CE 支持 64 位版本 CentOS 7,并且要求内核版本不低于 3.10, CentOS 7 满足最低内核的要求,所以我们在CentOS 7安装Docker。Docker官方的Docker Registry是一个基础版本的Docker镜像仓库,具备仓库管理的完整功能,但是没有图形化界面。命令中挂载了一个数据卷registry-data到容器内的/var/lib/registry 目录,这是私有镜像库存放数据的目录。docker-ce为社区免费版本。启动docker前,一定要关闭防火墙后!

weixin_56781779的博客 6万+

S32K344 Bootloader实战:一个按键实现从Boot到App的无缝跳转(附完整代码)

本文详细介绍了基于NXP S32K344微控制器的Bootloader开发实战,重点解析如何通过一个硬件按键实现从Boot到App的可靠跳转。内容涵盖内存分区规划、中断向量表重映射、外设初始状态管理等核心要素,并提供了完整的代码示例和调试技巧,适用于汽车电子和工业控制等高可靠性应用场景。

weixin_29192365的博客 307

在CentOS上安装Docker

1.安装yum-utils包,并设置docker存储库 sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 2.安装最新版本的Docker Engine和 containerd sudo yum install docker-ce docker-ce-cli containerd.io 3.启动docker

千月落 1万+

Potplayer + LAVFilters + madVR 配置教程

文章目录Potplayer + LAVFilters + madVR 配置教程工具安装篇设置调教1.potplayer播放器设置加载LAVFilters和madVR1.选择“源滤镜/分离器”选项,选择“滤镜/解码器管理”2.“添加外部滤镜”3.浏览到刚才LAVFilters解压的文件夹,分别添加图示项。4.添加后回到管理界面设置,点击左边的”LAV AudioDecoder”,将右边”音频解码器”...

re 16万+

(53页PPT)新型智慧病房整体解决方案(附下载方式)

当前医疗场景存在三大核心矛盾:院内感染风险(如输液异常发现滞后)、信息孤岛现象(11类业务系统数据割裂)、管理效能不足(30%护理时间耗费在机械性工作)。实际案例显示,整体运营效率提升40%,患者满意度提高28个百分点,真正实现了"让技术有温度,让数据会说话"的价值理念。本文将从需求分析、技术架构、应用场景三个维度,深度剖析这份53页解决方案的创新价值与实践路径。床旁智能终端整合12项功能:包括体征自动采集(误差率<1%)、医嘱执行核对(100%条码校验)、智能床垫离床报警(响应时间3秒)等。

AI_data_cloud的博客 715

Centos安装docker

Centos docker安装

打盹儿的博客 1万+

解决在封装自定义IP时加入ila,或者其他ip核时出错的情况

在查阅很多资料后,明白了这个应该是软件bug,但是最终还是解决了问题 我们只需要删除

weixin_42553916的博客 3604

VMware安装CentOS、CentOS安装Docker、Docker安装Mysql、Redis

在Vmware上安装CentOS7,并在Linux系统中安装Docker,使用Docker安装Mysql、Redis

Qu_QU_Xiao_Xiang的博客 3030

华为OD机试真题 新系统【网络数据包收发处理】

华为OD机试 新系统真题【网络数据包收发处理】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【网络数据包收发处理】多语言题解。

qq_45776114的博客 442

【图像拼接】论文精读:As-Rigid-As-Possible Shape Manipulation(ARAP)

文章目录前言1.摘要2.算法的总体流程总结 前言 图像变形算法 1.摘要 论文提出了一个二维图形互动系统。图形是建立在三角形网格上的,用户只需移动几个网格顶点(限制顶点),系统通过最小化每个三角形的误差计算网格剩余顶点(自由顶点)的位置。 算法分两步: 适当旋转每个三角形。 调整大小。 关键是使用二次度量误差将最小化问题转换成线性方程组,然后再解这个方程组。 刚性形状变形是很难的,论文的研究使其变得简单。 2.算法的总体流程 总的流程分三步: 将图形用三角形网格覆盖 选择三个点(限制顶点) 操纵限

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 15万+

CentOS之——CentOS8 安装 Docker

官方参考地址:https://docs.docker.com/install/linux/docker-ce/centos/ 里面包含包下载地址:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 安装依赖 sudo yum install -y yum-utils device-mapper-pers...

冰河的专栏 4万+

PCL:SAC-IA+ICP配准

【代码】SAC-IA+ICP配准。

m0_71596228的博客 1017

centos安装docker,docker安装centos进而安装宝塔

docker安装centos、centos安装docker

嘻嘻的博客 2055

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

CentOS上安装Docker

主要介绍在如何在CentOS上安装Docker

不负热爱 4248

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Cenots7安装Docker centos安装Docker centos7安装Docker

`Docker`是一种基于容器技术的应用封装、发布和执行平台,其中镜像和容器是其核心概念。 `镜像`是Docker的构建基础,可以将其视为一个静态的文件系统快照,包含了运行应用程序所需的一切:代码、运行环境、库、依赖项等。镜像由Dockerfile定义,并通过docker build命令构建。 容器是从镜像中创建并运行的实例,它封装了应用程序及其所有依赖项,并与主机系统隔离。容器可以被启动、停止、暂停、删除等,使得应用程序的开发、测试、部署、运维等过程更加灵活和高效。容器由Docker引擎运行,并由do

半只 2881

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

CentOS下 Docker、Docker Compose 的安装教程

Docker要求CentOS系统的内核版本高于3.10,我们首先通过uname -r。

justlpf的专栏 2万+

CentOS Docker 安装

通过以上步骤,你可以在CentOS上成功安装Docker。无论是使用yum包管理器还是使用脚本安装,都能轻松完成。希望这些步骤对你有所帮助!如果有任何问题,请随时提问。阿里云百炼大模型通义灵码_智能编码助手面向用户上线个人和企业版产品云工开物_阿里云高校计划助力高校科研与教育加速。无影云电脑个人版简单易用、安全高效的云上桌面服务云服务器ECS省钱攻略五种权益,限时发放,不容错过。

Bruce_xiaowei的博客 1441

centos8 安装 docker

centos8 安装 docker centos安装docker 官方参考地址:https://docs.docker.com/install/linux/docker-ce/centos/ 里面包含包下载地址:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 安装依赖 yum insta...

梦想起飞的地方......... 1万+

CentOS安装docker

作用:自动回答"yes",跳过确认,自动安装,避免交互式安装中断继续。检查是否安装了某个包(package): rpm -q xxx。(2) docker官网暂时不可用,建议切换镜像云为阿里云。注意:这里很容易出现安装失败,建议切换至阿里的云镜像地址。注意:docker官网往往不好使,你可以尝试使用阿里的。(4) dns解析网站失败。(3) 防火墙阻止了。

猴子 1042
上一篇: TestNG测试
下一篇: Docker部署SpringBoot项目
l_learning
博客等级 码龄8年 15粉丝 82原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值