Git Product home page Git Product logo

robot_cx_py27's Introduction

Background

This is a docker container which with a pre-installed Python 2.7, cx_Oracle module and Oracle XE 12.1 client.

Create a Docker File

FROM devilrancy/robot_cx_py27
COPY yourapp.py /code/app.py

Build it

$ docker build -t my-python-app .
$ docker run -it --rm --name my-web-app my-python-app

Running Python app from local volume

Local volume where app resides must have a main application whose name is app.py

docker run -it --rm --name my-python-app -v "/my/local/path/":/code devilrancy/robot_cx_py27

Example

Create file app.py in your directory with contents below
from flask import Flask
import cx_Oracle

app = Flask(__name__)
app.debug = True

@app.route('/hello')
def hello():
    return 'Hello World! Running with Oracle!'

if __name__ == "__main__":
    app.run(host="0.0.0.0", debug=False)
Run application using command below
docker run -it --rm --name my-python-app -p 5500:5000 -v `pwd`:/code sbanal/python-oracle-xe12.1-latest
Open a browser and enter http://[docker machine ip]:5500/hello

Example http://192.168.99.100:5500/hello

robot_cx_py27's People

Contributors

devilrancy avatar

Watchers

 avatar  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.