Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Hayaku - tooling for generating dockerfile

Project Description
Hayaku - lightweight Python utility to generate Dockerfile and distribute tiny python apps without including sources

[![Build Status](](

## Instalation

pip install hayaku

## Why?
Disclaimer this repo being made just for fun in certain circumstances and have non opinionated approach for doing things.
The purpose of this is to wrap your existing tooling written in python into containers and then ship/distribute it without complicated
workflow around git repo's.

## Approach
0. Autodetect of required pip packages which needs to be installed
1. Encode py sources with base64/zip/bzip
2. Put encoded data into of generated `Dockerfile` ENV (According to POSIX we can put up to 256Mb into env variable)

ENV PY_LIB "{body}"


3. Extract it during docker build

RUN python -c "import os,base64;b=os.getenv('PY_LIB');b=base64.b64decode(b);print(b.decode('utf-8'))" | tee

4. So the final generated Dockerfile will looks like this


FROM python:3.6

MAINTAINER Erlich Bachman


RUN pip install requests

ENV PY_LIB "aW1wb3J0IGJhc2U2NAppbXBvcnQgb3MKZnJvbSB...."
RUN python -c "import os,base64;b=os.getenv('PY_LIB');b=base64.b64decode(b);print(b.decode('utf-8'))" | tee

CMD python

which you can ship as a file, build and push image to private docker registry, etc...

## Seriosly ?
It's up to you. It worked for my limited usecase and I hope it might be helpfull for somebody else. As it said in disclamer: this repo being made just for fun in certain circumstances and have non opinionated approach for doing such things.
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hayaku-0.1.2.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Jul 8, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting