{ "info": { "author": "Jen-Soft", "author_email": "jen.soft.master@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apple Public Source License", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Natural Language :: Russian", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: System", "Topic :: System :: Clustering", "Topic :: System :: Emulators" ], "description": "# pydocker\nEasy generator Dockerfile for humans\n\n Let's use power of python for generate dockerfile!\n \n Advantages:\n - all features from python: variables, multiline strings, code reuse.\n - keep all your code in one file [bash, python, conf, ...]\n - generate many docker files from one template [testing, production, ]\n - generate sequence [Dockerfile.debian => Dockerfile.python => Dockefile.yourapp, ...]\n - or if you not expert in sed, awk - you can use python for modify conf files : )\neasy code, easy costomize\n\n# Install\n # sudo apt-get install python-setuptools && sudo easy_install pip\n pip install -U pydocker\n\n\n# Using \n
# Dockerfile.py\n```python\nimport sys\nimport logging\nimport pydocker # github.com/jen-soft/pydocker\n\nlogging.getLogger('').setLevel(logging.INFO)\nlogging.root.addHandler(logging.StreamHandler(sys.stdout))\n\n\nclass DockerFile(pydocker.DockerFile):\n \"\"\" add here your custom features \"\"\"\n\n\nd = DockerFile(base_img='debian:8.2', name='jen-soft/custom-debian:8.2')\n\nd.RUN_bash_script('/opt/set_repo.sh', r'''\n```\n```bash\ncp /etc/apt/sources.list /etc/apt/sources.list.copy\n\ncat >/etc/apt/sources.list <