How to install python in a docker image?

后端 未结 2 2012
忘掉有多难
忘掉有多难 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:15

    Note: Below commands may require root/administrative previleges.

    1. Download docker image docker pull ubuntu
    2. Start interactive container docker run -it ubuntu /bin/bash

    Note: By default you will be logged in inside container as root user if not then either elevate your privileges to root or use sudo before below listed commands

    1. Update container instance apt-get update
    2. For python 2.7 apt-get install python2
    3. For Python 3.x apt-get install python3

提交回复
热议问题