node官方docker镜像运行bower 提示 permission denied 解决方法
在使用node官方docker镜像部署node应用时,应用需要npm的scripts中运行bower install 来安装前端包,但是用docker 构建时失败,提示 permission deined. 因为官方镜像的默认用户叫node,所以才会出现没有root权限来运行bower。
解决办法只需要在执行npm 脚本时加上 --unsafe-perm,如: npm --unsafe-perm install,这样scripts中的脚本就会拥有root权限,从而执行一些需要root权限的脚本。
该参数说明如下:
unsafe-perm
- Default: false if running as root, true otherwise
- Type: Boolean
Set to true to suppress the UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.
https://docs.npmjs.com/misc/config#unsafe-perm
node官方docker镜像运行bower 提示 permission denied 解决方法的更多相关文章
- Linux启动ftp服务器530 Permission denied解决方法(已试,行)
Linux启动ftp服务器530 Permission denied解决方法重新在虚拟机下安装了linux.现在我想启动linux自带的ftp服务器:#service vsftpd start . ...
- npm install 报错,提示`gyp ERR! stack Error: EACCES: permission denied` 解决方法
m install 报错,提示gyp ERR! stack Error: EACCES: permission denied 猜测可能是因为没有权限读写,ls -la看下文件权限设置情况 [root@ ...
- docker 错误failed to open stream: Permission denied 解决方法
在服务器上面.运行docker时,php目录会发生权限问题解决方法如下: 1:进入php目录下面 docker exec -ti php56 /bin/bash #进入php容器 chown -R w ...
- Linux permission denied解决方法
一.准备 比如建立一个test.sh的脚本文件,脚本代码如下: #! /bin/bash echo Hello,world! 代码功能实现的是:输出字符Hello,world! 二.运行脚本 在终端切 ...
- zabbix报错cannot set resource limit: [13] Permission denied解决方法
zabbix-server启动时出现以下错误: 2912:20180326:050930.023 using configuration file: /etc/zabbix/zabbix_server ...
- touch: cannot touch '/usr/local/tomcat/logs/catalina.out': Permission denied解决方法
一.报以下错误: ./startup.sh Using CATALINA_BASE: /usr/local/tomcat702 Using CATALINA_HOME: /usr/local/tomc ...
- SVN报错:can't open file db/txn-current-lock:permission denied 解决方法
其实这个问题是这样的.下面我举个例子:比如版本库SVN是root用户创建的但是启动服务的时候没有选择root启动,而是在其他用户转托管太下启动的,所以只能读不能写. 解决方法:停止svn服务:kill ...
- /tmp目录下执行脚本失败提示Permission denied
Linux上执行Shell脚本运行失败提示Permission denied一个问题,挺好的问题,切中了知识盲点. 问题现象 Shell脚本在/tmp目录下,执行./test.sh运行失败,提示Per ...
- [转帖]Linux /tmp目录下执行脚本失败提示Permission denied
Linux /tmp目录下执行脚本失败提示Permission denied https://www.cnblogs.com/linyfeng/p/11087655.html 国产化的环境上 就有一个 ...
随机推荐
- CentOS7下二进制文件安装MySQL5.6
1.查看已装包 [root@host2 ~]# rpm -qa | grep mysql mysql-libs-5.1.71-1.el6.x86_64 [root@host2 ~]# [root@ho ...
- 【总结整理】http-https
上面这种加密消息的方式就是对称加密,你知道如何加密,也知道如何解码.然后李雷跟韩梅梅用的字母表偏移的加密方法叫 Caesar cipher, 凯撒加密.现实世界中用的加密算法会更复杂,但是基本原理相同 ...
- SpringBoot04 SpringBoot 和 MyBatis 整合
1 所需的jar包 mysql驱动包:mysql-connector-java 数据库链接池:druid mybatis对应jar包:mybatis-spring-boot-starter 分页查询对 ...
- RStudio 断点调试 进入for循环语句调试
参考: http://www.rstudio.com/ide/docs/debugging/overview 1.进入调试模式 全选代码,点击source即可进入调试模式. 2.进入for 调试 在F ...
- 3、Linux下配置Java环境
转载:http://blog.sina.com.cn/s/blog_c5a35e780102wtxl.html 生物信息很多软件都是用java写的,所以需要在linux上配置java运行环境.平台上的 ...
- 《精通Spring4.X企业应用开发实战》读后感第五章(基于注解的配置)
- 让开发更简单 —— Coding Enterprise 发布
今天,我们很高兴地宣布 Coding Enterprise 发布了 —— Coding Enterprise 是 CODING 专为企业打造的软件开发协作平台,提供了针对中小型企业的公有云版本和针对大 ...
- java8 创建树结构的数据
private List<TreeNode> createTree(Integer pid, Map<Integer, List<SysPermission>> m ...
- JQuery获取body的大小
$('body').height(); $('body').width();
- 【redis对象,集合序列化Demo】
package org.seckill.dao.cache; import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStr ...