Skip to content

Instantly share code, notes, and snippets.

@msoedov
Last active December 10, 2017 22:25
Show Gist options
  • Save msoedov/a349c1861765108b478eba617da8a566 to your computer and use it in GitHub Desktop.
Save msoedov/a349c1861765108b478eba617da8a566 to your computer and use it in GitHub Desktop.
dockerfile = """
FROM python:{py_version}
MAINTAINER {maintainer}
WORKDIR /app
RUN pip install {requirements}
ENV PY_LIB "{app_content | encode_base64}"
RUN python -c "import os,base64;b=os.getenv('PY_LIB');b=base64.b64decode(b);print(b.decode('utf-8'))" | tee app.py
CMD python app.py
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment