200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 使用Docker安装Redis

使用Docker安装Redis

时间:2024-05-15 05:44:34

相关推荐

使用Docker安装Redis

1.进入Docker官网

/

2.在Docker官网上搜索Redis

这里使用 docker pull redis 默认使用的国外的仓库速度比较慢。所以这里推荐使用docker中国https://www.docker-/get-docker 进行加速

就可以使用

docker pull registry.docker-/library + 对应的组件进行加速

出现了上面的这个问题。而这个问题是在docker中不支持使用HTTP请求或者是使用HTTPS的请求。那么怎么才能让Docker支持HTTP呢。就需要配置–insecure-registry选项才可以,而且配置完以后需要重启docker daemon

需要进入到/etc/docker中

查看有没有 daemon.json。这是docker默认的配置文件。

如果没有新建,如果有,则修改。

root# vi daemon.json{"registry-mirrors": ["https://registry.docker-"]}

[root@VM_0_2_centos ~]# service docker restartRedirecting to /bin/systemctl restart docker.service[root@VM_0_2_centos ~]# docker search centosNAME DESCRIPTION STARSOFFICIAL AUTOMATEDcentos The official build of CentOS. 5284[OK] ansible/centos7-ansible Ansible on Centos7121 [OK]jdeathe/centos-ssh CentOS-6 6.10 x86_64 / CentOS-7 7.5.1804 x... 108 [OK]consol/centos-xfce-vnc Centos container with "headless" VNC sessi... 83 [OK]imagine10255/centos6-lnmp-php56 centos6-lnmp-php5653 [OK]centos/mysql-57-centos7 MySQL 5.7 SQL database server 50 tutum/centos Simple CentOS docker image with SSH access44 gluster/gluster-centos Official GlusterFS Image [ CentOS-7 + Glu... 40 [OK]openshift/base-centos7 A Centos7 derived base image for Source-To... 40 centos/postgresql-96-centos7 PostgreSQL is an advanced Object-Relationa... 37 centos/python-35-centos7 Platform for building and running Python 3... 34 kinogmt/centos-ssh CentOS with SSH 26 [OK]centos/httpd-24-centos7 Platform for running Apache httpd 2.4 or b... 22 openshift/jenkins-2-centos7 A Centos7 based Jenkins v2.x image for use... 20 centos/php-56-centos7 Platform for building and running PHP 5.6 ... 20 pivotaldata/centos-gpdb-dev CentOS image for GPDB development. Tag nam... 10 openshift/wildfly-101-centos7A Centos7 based WildFly v10.1 image for us... 6openshift/jenkins-1-centos7 DEPRECATED: A Centos7 based Jenkins v1.x i... 4darksheer/centos Base Centos Image -- Updated hourly 3[OK]pivotaldata/centos Base centos, freshened up a little with a ... 3pivotaldata/centos-mingw Using the mingw toolchain to cross-compile... 2pivotaldata/centos-gcc-toolchain CentOS with a toolchain, but unaffiliated ... 1blacklabelops/centosCentOS Base Image! Built and Updates Daily!1[OK]smartentry/centos centos with smartentry0[OK]jameseckersall/sonarr-centos Sonarr on CentOS 70[OK]

到这里上面那个问题算是解决完成。然后执行

docker pull registry.docker-/library/redis

获取对应的镜像获取完成之后使用docker image命令查看

3.启动Redis

docker run -d -p 6379:6379 --name myredis registry.docker-/library/redis

4.使用docker ps 查看进程

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。