非root用户启动redis容器报错mkdir: cannot create directory '/bitnami/redis': Permission denied
问题:
使用docker启动容器时,报错如下
zh@debian:~/testPath$ docker-compose up redis
Starting testpath_redis_1 ... done
Attaching to testpath_redis_1
redis_1 |
redis_1 | Welcome to the Bitnami redis container
redis_1 | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-redis
redis_1 | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-redis/issues
redis_1 | Send us your feedback at containers@bitnami.com
redis_1 |
redis_1 | INFO ==> ** Starting Redis setup **
redis_1 | WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
redis_1 | INFO ==> Initializing Redis...
redis_1 | mkdir: cannot create directory '/bitnami/redis': Permission denied
解决方法
redis:
image: "bitnami/redis"
user: root #注意看这里,添加了这一行后就可以解决
ports:
- '127.0.0.1:6379:6379'
volumes:
- "/etc/localtime:/etc/localtime:ro"
- './redis:/bitnami/redis'
environment:
- ALLOW_EMPTY_PASSWORD=yes
restart: always
非root用户启动redis容器报错mkdir: cannot create directory '/bitnami/redis': Permission denied的更多相关文章
- 非root用户执行java进程报错:fork: retry:资源暂时不可用
vim /etc/security/limits.conf # End of file * soft nproc 65535 * hard ...
- 【出错记录】Tomcat非root用户启动无法拥有权限读写文件
简单记录下,如有必要,将深入补充: 一.非root用户运行Tomcat及原因 由于项目中,为了安全需要,Tomcat将禁止以root形式启动,原因很简单,举个例子,一旦有人恶意将jsp文件透过某个别的 ...
- centos7新增用户并授权root权限、非root用户启动tomcat程序
一.centos7新增用户并授权root权限 cat /etc/redhat-release查看centos版本号 1.禁用root账户登录 vim /etc/ssh/sshd_config 找到这一 ...
- 二进制方式安装docker(非root用户启动docker)
二进制方式安装docker(非root用户启动docker) 一.下载安装包: 地址:https://download.docker.com/linux/static/stable/x86_64/ 这 ...
- 短网址资料-nginx非root用户启动-systemctl启动脚本-分割root权限
https://www.cnblogs.com/aspnethot/articles/3492191.htmlhttps://www.cnblogs.com/aspnethot/articles/34 ...
- zzw原创_非root用户启动apache的问题解决(非root用户启动apache的1024以下端口)
场景:普通用户编译的apache,要在该用户下启动1024端口以下的apache端口 1.假设普通用户为sims20,用该用户编译 安装了一个apache,安装路径为/opt/aspire/produ ...
- Ubuntu配置Tomcat9非root用户启动
unix类系统的root用户具有极大的权利,所以很多时候我们不希望程序以root身份启动,这也就是配置Tomcat以指定身份(非root)启动的初衷,虽然也没人来攻击我的服务器,但本着学习学习的目的, ...
- 使用非root用户启动tomcat
以下操作均为以root用户运行1.添加tomcat用户组 /usr/sbin/groupadd tomcat 2.添加tomcat用户,并限制登录 /usr/sbin/useradd -s /bin/ ...
- Centos6.4 设置开机自动以某个非root用户启动脚本
开机自动运行脚本,可以将脚本的执行命令放在 /etc/rc.d/rc.local 文件中,但是这样开机自动运行这个脚本的用户默认为root. 如果想以某个非root用户运行脚本,可以使用如下命令: s ...
随机推荐
- Python中文繁简体转换工具
Openccpy ___ _____ __ ___ ___ ___ _____ __ __ / __`\/\ '__`\ /'__`\/' _ `\ /'___\ /'___\/\ '__`\/\ \ ...
- python爬虫爬取京东、淘宝、苏宁上华为P20购买评论
爬虫爬取京东.淘宝.苏宁上华为P20购买评论 1.使用软件 Anaconda3 2.代码截图 三个网站代码大同小异,因此只展示一个 3.结果(部分) 京东 淘宝 苏宁 4.分析 这三个网站上的评论数据 ...
- springboot+VUE(一)
https://segmentfault.com/blog/wangjihong 安装nodejs与NPM 下载nodejs的LTL版本,并安装 https://nodejs.org/en/ 执行no ...
- nagios nrpe
- mvc后台上传
public ActionResult AddEnclosure(HttpPostedFileBase Filedata) { if (Filedata == null || string.IsNul ...
- cached_property的使用
cached_property修饰过的函数,变成是对象的属性,该对象第一次引用该属性时,会调用函数,对象第二次引用该属性时就直接从词典中取了,这也说明引用属性是经过__getattritue__. c ...
- mycat数据中间件、nginx
MyCat & Nginx 课程目标 目标1:理解MyCat分片,能够配置MyCat分片 目标2:掌握Nginx的安装与静态网站部署 目标3:掌握Nginx的静态网站部署 目标4:理解N ...
- jpa @RepositoryRestResource
依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spr ...
- TXMLDocument 创建空值节点不要缩写
TXMLDocument 创建空值节点不要缩写 xmldoc.CreateNode('input'); 然后访问 xmldoc.DocumentElement.XML <input/> 节 ...
- javascript中如何判断变量类型
typeof 只能判断基本类型,如number.string.boolean.当遇上引用类型变量就没那么好用了,结果都是object.使用Object.prototype.toString.call( ...