Skip to main content

Build your Python project to Docker image on remote Docker server

Project description

PESI(English version README

从终端打包Python项目到远程Docker服务器

使用环境(目前测试)

  • Ubuntu 18.04.4 LTS / Ubuntu 16.04.6 LTS
  • Python 3.5,3.6

Base on python package

  • click == 7.1.1
  • docker == 4.1.0

安装

pip install pesi

快速上手(example)

注意: 确保你要远程的Docker服务器或者本地Docker已经打开remote api端口,取决于你在setup.cfg里面的配置( https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd)

git clone https://github.com/pesi1874/pesi.git
cd psei/example
pesi init  <这一步骤会将test-project文件夹拷贝到depoly文件夹中,并重命名为app>
pesi build  <这一步骤会使用docker sdk,先拷贝整个项目到远程docker服务器,再打包成镜像>

项目文件结构要求

|-- project-name/
    |--deploy/
        |-- Dockerfile
        |-- requirements.txt
        |-- run.sh
    |--project-name/
        |--main.py
    |--setup.cfg

构建项目

cd <python project>
pesi init
pesi build

Help

pesi --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pesi-0.0.2.tar.gz (107.6 kB view hashes)

Uploaded Source

Built Distributions

pesi-0.0.2-py3.6.egg (318.1 kB view hashes)

Uploaded Source

pesi-0.0.2-py3-none-any.whl (137.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page