How to install new packages into non-root Docker Container?

后端 未结 3 1525
难免孤独
难免孤独 2021-01-31 14:14

I\'m trying to extend a docker container for SOLR. I just want to install vim into it. But when I run the docker build it complains that I\'m not root.

This

3条回答
  •  你的背包
    2021-01-31 14:29

    Switch to the root user, then switch back to the original solr user:

    USER root
    
    install/updates
    
    USER solr
    

提交回复
热议问题