-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Maxime Burri edited this page Apr 12, 2017
·
22 revisions
Get started with Docker Docker hub
(parts from Python docker library readme)
In a directory, create files :
-
helloworld.py :
print "Hello, World!"
-
requirements.txt (left empty)
-
Dockerfile
FROM python:2-onbuild
CMD [ "python", "./your-daemon-or-script.py" ]
Then build and run the Docker image:
$ docker build -t my-python-app .
$ docker run -it --rm --name my-running-app my-python-app
- In directory Dockers, make this commands in this order:
$ export TOKEN=yourgithubtoken
$ docker-compose up
- build
$ docker build -t github_retriever_app .
- run
$ docker run -e token=2je8dje98ekje0ekje0je... github_retriever_app `
- run and export file
$ docker run -e token=... -v `pwd`/../csv_data:/usr/src/app/csv_data github_retriever_app
- build
$ docker build -t jira_retriever_app .
- run
$ docker run jira_retriever_app`
- run and export file
$ docker run -v `pwd`/../csv_data:/usr/src/app/csv_data jira_retriever_app
- stop all containers:
$ docker kill $(docker ps -q)
- remove all containers:
$ docker rm $(docker ps -a -q)
- remove all docker images :
$ docker rmi $(docker images -q)
- change github repo :
$ export GITHUB_REPO="spring-projects/spring-amqp"
- change jira project :
$ export JIRA_PROJECT="AMQP"
- change jira api server :
$ export JIRA_SERVER="https://jira.spring.io"