Updating PATH environment variable permanently in Docker container

前端 未结 4 1632
北荒
北荒 2020-12-12 23:41

I tried adding to the PATH in the files ~/.profile and /etc/profile as follow.

PATH = $PATH:/required/path
         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 00:13

    If you want to include a /new/path in the Dockerfile, adding the line:

    ENV PATH "$PATH:/new/path"

    in Dockerfile should work.

提交回复
热议问题