3
1

docker で pythonするとき、Anacondaを利用してきた。

最近は、Anacondaに入っているライブラリを使わない用事もあり、
https://hub.docker.com/_/python

を利用している。githubはこちららしい。
https://github.com/docker-library/python

早速起動してみる。

bash
$ docker run -v /tmp/python:/tmp/python -it python /bin/bash
Unable to find image 'python:latest' locally
latest: Pulling from library/python
5e0b432e8ba9: Pull complete 
a84cfd68b5ce: Pull complete 
e8b8f2315954: Pull complete 
0598fa43a7e7: Pull complete 
83098237b6d3: Pull complete 
b92c73d4de9a: Pull complete 
c387e200448c: Pull complete 
2a8d9e948b85: Pull complete 
b32ac80c02a3: Pull complete 
Digest: sha256:e78ea3ee9f77c569c68c98de106f06b20bb6f137303abba4362c2b8a92184969
Status: Downloaded newer image for python:latest

理由の一つは上記のようにモジュールに分かれていて、更新のある部分だけでよい点かもしれない。
各モジュールの構成は未調査。
https://github.com/docker-library/python/blob/master/3.10/alpine3.15/Dockerfile

Dockerfileを見ると、aptで何を入れているかがわかる。
python では、pipを入れていることがわかる。

Windowsでpython

自分の記事で、viewsが一番多いのは、Windowsにpythonを導入する記事。

M.S.WindowsにPython3 (Anaconda3) を導入する(7つの罠)
https://qiita.com/kaizen_nagoya/items/7bfd7ecdc4e8edcbd679

今日のエラー

ディレクトリ(フォルダ)指定の / を抜かした。

bash
$ docker run -v tmp/python:tmp/python -it python /bin/bash

docker: Error response from daemon: invalid volume specification: 'tmp/python:tmp/python': invalid mount config for type "volume": invalid mount path: 'tmp/python' mount path must be absolute.
See 'docker run --help'.

参考資料

docker(18) なぜdockerでpython/Rを使って機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

言語処理100本ノックをdockerで。python覚えるのに最適。docker(19) python(1)
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

あなたもdocker, 私もdocker。docker(130)
https://qiita.com/kaizen_nagoya/items/8f2746f10f30b575d0a8

資料集 [あなたもdocker私もdocker一覧] docker(0)
https://qiita.com/kaizen_nagoya/items/45699eefd62677f69c1d

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

3
1
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
3
1