Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devilrancy/robot_cx_py27
https://github.com/devilrancy/robot_cx_py27
cx-oracle docker docker-image python robotframework
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/devilrancy/robot_cx_py27
- Owner: devilrancy
- Created: 2017-02-04T11:10:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-04T21:06:19.000Z (almost 8 years ago)
- Last Synced: 2024-11-06T07:28:30.811Z (about 2 months ago)
- Topics: cx-oracle, docker, docker-image, python, robotframework
- Language: Python
- Size: 57.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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_Oracleapp = 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