Giter Site home page Giter Site logo

mstumberger / python-runtime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/python-runtime

0.0 2.0 0.0 326 KB

gcr.io/google_appengine/python - Docker images for python

Home Page: https://cloud.google.com/python

License: Apache License 2.0

Shell 24.93% Python 75.07%

python-runtime's Introduction

Google Cloud Platform - Python Runtime Docker Image

This repository contains the source for the gcr.io/google-appengine/python docker base image. This image can be used as the base image for running applications on Google App Engine Flexible, Google Kubernetes Engine, or any other Docker host.

This image is based on Debian Jessie and contains packages required to build most of the popular Python libraries. For more information about this runtime, see the documentation.

App Engine

When using App Engine Flexible, you can use the runtime without worrying about docker by specifying runtime: python in your app.yaml:

runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
  # You can also specify 2 for Python 2.7
  python_version: 3

If you have an existing App Engine application using this runtime and want to customize it, you can use the Cloud SDK to create a custom runtime:

gcloud beta app gen-config --custom 

You can then modify the Dockerfile and .dockerignore as needed for you application.

Kubernetes Engine & other Docker hosts.

For other docker hosts, you'll need to create a Dockerfile based on this image that copies your application code, installs dependencies, and declares an command or entrypoint. For example:

FROM gcr.io/google-appengine/python

# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env

# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH

# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt

# Add the application source code.
ADD . /app

# Run a WSGI server to serve the application. gunicorn must be declared as
# a dependency in requirements.txt.
CMD gunicorn -b :$PORT main:app

Building the image

Google regularly builds and releases this image at gcr.io/google-appengine/python.

See RELEASING.md for more information.

Contributing changes

Licensing

python-runtime's People

Contributors

nkubala avatar liyanhui1228 avatar dpebot avatar proppy avatar dlorenc avatar andrewsg avatar sharifelgamal avatar icecrime avatar bigblah avatar jeadorf avatar rgbkrk avatar henryvps avatar slhawkins avatar

Watchers

James Cloos avatar Marko Štumberger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.