非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 ...
随机推荐
- LeetCode 24. Swap Nodes in Pairs 成对交换节点 C++/Java
Given a linked list, swap every two adjacent nodes and return its head. You may not modify the value ...
- SoapUI 请求 https 报 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
在 E:\ProgramFiles\SmartBear\SoapUI-Pro-5.1.2\bin\SoapUI-Pro-5.1.2.vmoptions 中添加一行代码,代码如下: -Dsoapui.h ...
- 简介C#读取XML的方式(转)
在程序中访问进而操作XML文件一般有两种模型,分别是使用DOM(文档对象模型)和流模型,使用DOM的好处在于它允许编辑和更新XML文档,可以随机访问文档中的数据,可以使用XPath查询. XML作用 ...
- Spring中@Value注解使用——一种新的直接读取配置文件的方式
1.@Value注解作用 该注解的作用是将我们配置文件的属性读出来,有@Value(“${}”)和@Value(“#{}”)两种方式. 2.@Value注解作用的两种方式 场景 假如有以下属性文件de ...
- thymeleaf标签必须由匹配的结束标记终止
问题描述 springboot使用Thymeleaf标签时会报元素类型必须由匹配的结果标记终止. 如下所示 如果我们一个个的给这些元素后面加上终止标记也是件很麻烦的事~~~~ 解决办法 方法一: 在p ...
- PeopleSoft通过status汇总进程运行情况
下面SQL可以按照run_status汇总进程的运行状态 SELECT RQST.RUNSTATUS, RQST.PRCSTYPE, (SELECT XLAT.XLATLONGNAME FROM PS ...
- Java8内置的函数式编程接口应用场景和方式
首先,我们先定义一个函数式编程接口 @FunctionalInterface public interface BooleanFunctionalInterface<T> { boolea ...
- liteUploader上传控件的封装使用
//原来的绑定方式 $('#' + frm_name).liteUploader({ script: url, params: { type: "image", size: siz ...
- 常用Macro
[enable_if] SFINAE是英文Substitution failure is not an error的缩写. 这句话什么意思呢?当调用模板函数时编译器会根据传入参数推导最合适的模板函数, ...
- 接口测试之——Charles抓包及常见问题解决(转载自https://www.jianshu.com/p/831c0114179f)
简介 Charles其实是一款代理服务器,通过成为电脑或者浏览器的代理,然后截取请求和请求结果达到分析抓包的目的.该软件是用Java写的,能够在Windows,Mac,Linux上使用,安装Charl ...