GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-source-code-notes/docker.md at master · DefTruth/python-source-code-notes

Expand file tree

/

docker.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
30 lines (19 loc) · 589 Bytes
/

docker.md

Copy path

File metadata and controls

30 lines (19 loc) · 589 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

使用 Docker 编译 Python 源码

  • 项目目录结构

    • python_source_code_study
      • build # build 目录,即 configure --prefix
      • Python-2.5 # 源码
  • Dockerfile

FROM ubuntu
RUN apt-get install -y gcc make vim
  • build image

docker build -t ubuntu:pyc .

  • run ubuntu:pyc

docker run -it --name ubuntu_pyc -v /Users/jiaminlu/Workspace/python/python_source_code_study:/data/python_source_code_study ubuntu:latest

  • 编译 Python
cd /data/python_source_code_study/Pyhton-2.5
./configure --prefix /data/python_source_code_study/build
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.