1. 程式人生 > >5-製作redis映象

5-製作redis映象

正式的製作redis映象 基礎映象參考以前文章
1:下載該檔案要執行安裝 http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 2:Dockerfile檔案內容 FROM 10.1.4.54:5000/ywcentos7 MAINTAINER ywmackjava ADD epel-release-latest-7.noarch.rpm /root/epel-release-latest-7.noarch.rpm RUN rpm -ivh /root/epel-release-latest-7.noarch.rpm RUN yum install -y redis 3:生成映象命令
[email protected] ywredis]# docker build -t 10.1.4.54:5000/ywredis . 4:檢視映象 [[email protected] ywredis]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 10.1.4.54:5000/ywredis latest 5dd077d5eed9 About a minute ago 402MB 10.1.4.54:5000/ywcentos7 latest a34621aafe50 8 minutes ago 359MB 10.1.4.54:5000/centos latest 602a1b38972c About an hour ago 197MB centos/centos 7 602a1b38972c About an hour ago 197MB 10.1.4.54:5000/nginx latest 1628545933ab 4 hours ago 108MB nginx latest 1628545933ab 4 hours ago 108MB <none> <none> 1717b3a9873b 5 hours ago 108MB nginx <none> da5939581ac8 3 weeks ago 108MB [
[email protected]
ywredis]#
5:啟動容器 docker run --name ywredis -it 10.1.4.54:5000/ywredis /bin/bash
6:開啟服務 ./bin/redis-server or ./bin/redis-server redis.config