In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to make a Redis Docker image quickly". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to make a Redis Docker image quickly".
Mirror image production
The smaller the image, the easier it is to deploy. In this respect, the lightweight Linux distribution is a good choice, here we choose alpine linux.
The latest version is 3.12.1. Officials have kindly provided the minirootfs package, which is for the container, with only the simplest environment, and the kernel has been removed.
You can download the compressed package directly from the domestic mirror source:
Https://mirrors.aliyun.com/alpine/v3.12/releases/x86_64/alpine-minirootfs-3.12.1-x86_64.tar.gz
Of course, docker imports the zip package directly from the link, and let docker download it himself.
Import a compressed package to become a mirror
Docker images https://mirrors.aliyun.com/alpine/v3.12/releases/x86_64/alpine-netboot-3.12.1-x86_64.tar.gz alpine:3.12.1
Make a redis image
You can write DockerFile to mirror redis, compile and package it into a new image.
From alpine:3.12.1 ADD https://mirrors.huaweicloud.com/redis/redis-6.0.9.tar.gz / RUN sed-I'Accord dlcopyright cdn.alpinelinux.orgplash mirrors.aliyun.com G'/ etc/apk/repositories & &\ apk add make gcc gears + linux-headers tar & & tar zxvf redis-6.0.9.tar.gz & & cd redis-6.0.9 & & make & make install &\ apk del make gcc Gmail + linux-headers tar & & rm-rfv / redis-6.0.9 ENTRYPOINT ["/ usr/local/bin/redis-server" "--protected-mode", "no"]
Build an image
Docker build-t redis:v6.0.
Summary
This is not used, the protected mode is turned off, it is not suitable for production environment, it is only suitable for local testing.
If you need to customize the configuration file, you can write a shell file to determine whether or not to load the configuration file.
Thank you for reading, the above is the content of "how to make a Redis Docker image quickly". After the study of this article, I believe you have a deeper understanding of how to quickly create a Redis Docker image, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.