How to install python in a docker image?

后端 未结 2 2017
忘掉有多难
忘掉有多难 2020-12-16 14:05

I want to create a docker image with selenium and chrome correctly installed, so I choose a base image with these properties. Therefore, the first

2条回答
  •  感动是毒
    2020-12-16 14:26

    RUN sudo apt-get update

    RUN sudo apt-get install python

    As hinted by:

    Acquire (13: Permission denied)

    I believe this is due to your base image:

    https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeChrome/Dockerfile

    As you can see it swaps from the default user context of 'root' to 'seluser'.

    You can either:

    • wear this as a consequence of the base image (i.e. use sudo)
    • swap back: USER root
    • or consider creating your own docker image to avoid swapping in the first place

    Hope that helps mate.

提交回复
热议问题