##############################################
centos7ビルドのpython3に基づいて#ランタイム環境
#ビルドコマンド:Dockerfileファイルディレクトリにドッキングウィンドウのビルドを実行する Pythonの-CentOSの-t:3.5 。
#コンテナの起動コマンド:RUNドッカー -itd --name =パイソン--restart常にが--privileged trueに /ルート/ Pythonの-v /ルート/ドッカーズ/パイソン/ cronを::/ -v /ルート/ドッカーズ/ PythonのVAR /スプールを/ cronのPythonの-のCentOS:3.5の/ usr / sbinに/ のinit
#容器に:ドッカーExecは、 Pythonの/ binに/ -IT bashの
##############################################
CentOSのFROM:7.6。1810
MAINTAINER mioshu#指定された著者情報
RUNのセット - EX \
#コンポーネントをプリインストール
&& yumをインストール-y wgetのタールlibffi-develのzlibを-develのbzip2の-develのopensslの-のdevelのncurses-develのsqliteの-develのreadlineの-develのTK- develのgccを作るのinitscript \
&&のwgetます。https:// www.python.org/ftp/python /3.5.0/Python-3.5.0.tgz \
&&タール-zxvf Python- 3.5。0 の.tgz \
&& CD Python- 3.5。0 \
&& ./configureを接頭辞=は/ usr / local /ののpython3 \
&& メイク\
&& \ make installを
&& make cleanを\
&&のrm -rf / Python- 3.5。0 * \
&&\リリース
-y python- yumをインストール&& ピップ
#デフォルトはのpython3で設定します
RUNのセット - EX \
#古いパイソンバックアップします
&& MVは/ usr / binに/ pythonのは/ usr / binに/ python27 \
&& MVは/ usr / binに/ PIPの/ usr / binに/ PIP-python2。7 \
#デフォルトのpython3を設定します。
&& LN -sは/ usr / local /のpython3 / binに/のpython3。5は/ usr / binに/ pythonの\
&&のln -sは/ usr / local /のpython3 / binに/ PIP3は/ usr / binに/ ピップ
#yumの故障原因のpythonの修正バージョンによる復元
RUN セット - EX \
&&のsed -i " S#は/ usr / binに/ pythonの#は/ usr / binに/ python2.7の#"は/ usr /ビン/ YUM \
&&のsed -i " S#は/ usr / binに/ pythonの# /usr/bin/python2.7# "は/ usr / libexecに/ urlgrabber-EXT- ダウン\
&& yumのインストール- Y deltarpm
#設定し、基本的な環境
RUNのセット - EX \
#東8地区にシステムのタイムゾーンを変更します。
&& RM -rfは/ etc / localtimeの\
&&のln -sを/ usr / share / zoneinfoの/アジア/上海の/ etc / localtimeの\
&& yumのインストール- yのvimの\
タイミングタスクコンポーネントインストール#
&& YUM - yはcronieをインストール
#サポート中国
RUN yumのKDEインストール -l10n -中国- yは
RUNのlocaledef -c -f UTF- 8 - 私がzh_CN zh_CN.utf8に
#更新バージョンピップ
RUNピップインストール - アップグレードピップ
ENV LC_ALL zh_CN.UTF - 8