1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Dockerのubuntu上でpython3,vimを使えるようにする

Last updated at Posted at 2021-06-25

#はじめに
https://qiita.com/Fu-Te/items/4adaf21582be7b6d5703
こちらの記事でDockerの環境構築とdocker上にubuntuを導入する作業を行なった。
僕は普段mac上でpythonファイルを生成し、実行を行なっていたが、docker上で開発を行なっていきたいということで、docker上にpythonを導入したいと考えた

#導入
今回はpython3とpipを導入することにする。

コンテナの検索

% docker search python3
NAME                                                                    DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
rackspacedot/python37                                                                                                   16                   
openwhisk/python3action                                                 Apache OpenWhisk runtime for Python 3 Actions   5                    
sellpy/python3-jupyter-sklearn                                          python3-jupyter-sklearn                         5                    [OK]
sellpy/python3-jupyter-sklearn-java                                     python3-jupyter-sklearn-java                    2                    [OK]
faucet/python3                                                           Python3 docker image for amd64                 2                    
codenvy/python34                                                        Dockerfile:https://github.com/codenvy/docker…   1                    
rackspacedot/python37-ansible23                                                                                         1                    
demisto/python3                                                                                                         1                    
rackspacedot/python38                                                                                                   1                    
sellpy/python3-gphoto2                                                  Python3, Gphoto2                                1                    [OK]
brumbrum/python3                                                        Immagine contenente python3                     1                    [OK]
brumbrum/python3-chrome                                                 Immagine di Python contenente chrome            1                    [OK]
rackspacedot/python3-pyrax                                                                                              0                    
sgoblin/python3.4                                                       My Python3.4 base image                         0                    [OK]
jmsearcy/python3-tkev                                                                                                   0                    
brumbrum/python3-develop                                                Immagine di Python3 per lo sviluppo             0                    [OK]
rackspacedot/python38-ansible29                                                                                         0                    
rtikid/python3-numpy-scipy-sympy-neuron-brian2-netpyne-inspyred-pyabf   python3 3.7.4 NEURON 7.6.7 BRIAN 2.3 netpyne…   0                    
devtestdemisto/python3                                                                                                  0                    
wikitolearn/python35                                                                                                    0                    
markstory/python3                                                       python3 tools                                   0                    
demisto/python3-deb                                                                                                     0                    
manods/python3_base                                                                                                     0                    
rackspacedot/python37-ansible27                                                                                         0                    
datarobot/python3-dropin-env-base                                       Python3 drop-in environment base image          0                  

pythonに関するものが多く出てきた。
docker searchで出てきたものはdocker hubで共有されている作成済みイメージで、使うことができる。

python3,pip3導入

前回の記事を参考に、docker上にubuntuを作成し、起動。

apt-get update
apt-get install -y python3 python3-pip

でpython3とpipの導入ができる。

python3
Python 3.8.5 (default, May 27 2021, 13:30:53) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

このようになれば導入完了!

#vimの導入
普段vimを使っていてdocker上でも使いたいので、導入をしていく。
今回はdockerのコンテナ上でubuntuを実行しているので、

# apt-get update
# apt-get install vim

で簡単に導入ができた。

1
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?