【问题标题】:Anaconda docker user permissionsAnaconda docker 用户权限
【发布时间】:2020-10-27 09:54:34
【问题描述】:

我正在努力解决与容器用户权限相关的一些问题。

我从this dockerfile 创建了一个图像。

如您所见,line 128 正在更改为 USER 1000

我正在尝试使用这个命令来玩 anaconda:

$ conda install pandas 
Collecting package metadata (current_repodata.json): failed

NotWritableError: The current user does not have write permissions to a required path.
  path: /opt/conda/pkgs/cache/9e0f62c3.json
  uid: 1000
  gid: 0

If you feel that permissions on this path are set incorrectly, you can manually
change them by executing

  $ sudo chown 1000:0 /opt/conda/pkgs/cache/9e0f62c3.json

In general, it's not advisable to use 'sudo conda'.

关于如何处理该问题的任何想法?

【问题讨论】:

标签: docker kubernetes anaconda apache-zeppelin


【解决方案1】:

如果您想扩展 Dockerfile,请在安装任何内容之前将用户改回 root USER 0,然后再改回非特权用户USER 1000。如果您正在运行容器或在其中执行容器,请将 --user 0 添加到您的命令 docker run --user 0 zeppelin

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-06
    • 2018-10-29
    • 2022-01-08
    • 2019-05-10
    • 2020-03-10
    • 2017-03-19
    • 2021-07-22
    • 1970-01-01
    相关资源
    最近更新 更多