如何解决 Docker for Windows 权限错误
How to solve Docker for Windows permission error
我目前面临一些“权限被拒绝”问题 - Docker for Windows 10.
我正在使用这张图片:Intersystems IRIS
我的这张图片的 Docker 文件是:
FROM store/intersystems/iris-community:2020.2.0.204.0
此外我正在使用docker-compose, docker-compose.yml:
version: '2'
services:
backend:
container_name: iris
build:
context: ./container/IRISDataPlatform
dockerfile: Dockerfile.yaml
volumes:
- ./container/IRISDataPlatform/ext:/external
ports:
- "9091:51773"
- "9092:52773"
environment:
- ISC_DATA_DIRECTORY=/external/irissys
- ICM_SENTINEL_DIR=/external
command: --password-file /external/password.txt
问题是每当我执行 docker-compose up -d 几秒钟后容器退出并显示以下消息:
[INFO] Initializing IRIS, please wait...
Starting IRIS
Invalid ownership for ./irisrecov
Initializing IRIS, please wait...
Starting IRIS
Recovery failure. Startup aborted.
[ERROR] Command "iris start IRIS quietly" exited with status 256
07/07/20-15:46:02:326 (374) 0 [Utility.Event]
ISC_DATA_DIRECTORY=/external/irissys
07/07/20-15:46:02:353 (374) 0 [Utility.Event] Executing iris qlist
07/07/20-15:46:02:580 (374) 0 [Utility.Event] Versions are the same
07/07/20-15:46:02:596 (374) 0 [Utility.Event] Source /usr/irissys:
2020.2.0.204.0com
07/07/20-15:46:02:612 (374) 0 [Utility.Event] Destination
/external/irissys: 2020.2.0.204.0com
07/07/20-15:46:02:627 (374) 0 [Utility.Event] Executing iris update
IRIS directory=/usr/irissys datadir=/external/irissys
versionid=2020.2.0.204.0com
07/07/20-15:46:02:680 (374) 0 [Utility.Event] Executing find
/usr/irissys/ -type d -exec chmod ugo-w {} +
07/07/20-15:46:03:349 (374) 0 [Utility.Event] Executing chmod ugo-w
/usr/irissys/
[ERROR] Possible causes:
[ERROR] - Incorrect user/group ownership of IRIS binaries
[ERROR] - Insufficient write permissions to ISC_DATA_DIRECTORY
[FATAL] Error starting InterSystems IRIS
到目前为止我尝试了什么:
- 向后端服务添加“用户”属性并将其设置为“root”或“irisowner”-> 两者均无效
- 将“运行 adduser irisusr root && adduser irisusr irisusr” 添加到我的 Docker 文件中(如此处所述:“https://community.intersystems.com/post/using-intersystems-iris-containers-docker-windows” ) 但它以:"adduser Only root may add a user or group to the system" while docker-compose build
你知道有什么解决办法吗?
提前致谢
您的 Dockerfile 中的序列应与此类似:
FROM intersystemsdc/iris-community:latest
USER root
RUN adduser irisusr root && adduser irisusr irisusr
USER irisowner
您可以使用 OpenExchange 中的任何模板作为示例
我目前面临一些“权限被拒绝”问题 - Docker for Windows 10.
我正在使用这张图片:Intersystems IRIS
我的这张图片的 Docker 文件是:
FROM store/intersystems/iris-community:2020.2.0.204.0
此外我正在使用docker-compose, docker-compose.yml:
version: '2'
services:
backend:
container_name: iris
build:
context: ./container/IRISDataPlatform
dockerfile: Dockerfile.yaml
volumes:
- ./container/IRISDataPlatform/ext:/external
ports:
- "9091:51773"
- "9092:52773"
environment:
- ISC_DATA_DIRECTORY=/external/irissys
- ICM_SENTINEL_DIR=/external
command: --password-file /external/password.txt
问题是每当我执行 docker-compose up -d 几秒钟后容器退出并显示以下消息:
[INFO] Initializing IRIS, please wait...
Starting IRIS
Invalid ownership for ./irisrecov
Initializing IRIS, please wait...
Starting IRIS
Recovery failure. Startup aborted.
[ERROR] Command "iris start IRIS quietly" exited with status 256
07/07/20-15:46:02:326 (374) 0 [Utility.Event] ISC_DATA_DIRECTORY=/external/irissys
07/07/20-15:46:02:353 (374) 0 [Utility.Event] Executing iris qlist
07/07/20-15:46:02:580 (374) 0 [Utility.Event] Versions are the same
07/07/20-15:46:02:596 (374) 0 [Utility.Event] Source /usr/irissys: 2020.2.0.204.0com
07/07/20-15:46:02:612 (374) 0 [Utility.Event] Destination /external/irissys: 2020.2.0.204.0com
07/07/20-15:46:02:627 (374) 0 [Utility.Event] Executing iris update IRIS directory=/usr/irissys datadir=/external/irissys versionid=2020.2.0.204.0com
07/07/20-15:46:02:680 (374) 0 [Utility.Event] Executing find /usr/irissys/ -type d -exec chmod ugo-w {} +
07/07/20-15:46:03:349 (374) 0 [Utility.Event] Executing chmod ugo-w /usr/irissys/
[ERROR] Possible causes:
[ERROR] - Incorrect user/group ownership of IRIS binaries
[ERROR] - Insufficient write permissions to ISC_DATA_DIRECTORY
[FATAL] Error starting InterSystems IRIS
到目前为止我尝试了什么:
- 向后端服务添加“用户”属性并将其设置为“root”或“irisowner”-> 两者均无效
- 将“运行 adduser irisusr root && adduser irisusr irisusr” 添加到我的 Docker 文件中(如此处所述:“https://community.intersystems.com/post/using-intersystems-iris-containers-docker-windows” ) 但它以:"adduser Only root may add a user or group to the system" while docker-compose build
你知道有什么解决办法吗?
提前致谢
您的 Dockerfile 中的序列应与此类似:
FROM intersystemsdc/iris-community:latest
USER root
RUN adduser irisusr root && adduser irisusr irisusr
USER irisowner
您可以使用 OpenExchange 中的任何模板作为示例