The instructions provided below specify the steps build following:
- Dockerfile
- Pushing an image to dockerhub
- Using the docker imager.
- Steps to run Docker compose
- Deployment on kubernetes
export CURDIR=$PWD
git clone https://github.com/prankkelkar/uber-cold-fusion.git
cd uber-cold-fusion
- Building dockerfile
#docker built -t <image-name> .
docker build -t uber-image .
- Creating a container using above image
#docker run -it -p <hostport to expose>:7000 -v <path-till-config-directory> image-name #Use -d flag instead of -it to start in daemon mode docker run -it -p 7001:7000 -v $CURDIR/config:/uber uber-image
- Creating a container using above docker-hub image for running service
docker run -it -p 7001:7000 -v $CURDIR/config:/uber prasanna025153/uber-cold-fusion:run
- Creating a container using above docker-hub image for running test cases
docker run -it -p 7001:7000 -v $CURDIR:/uber prasanna025153/uber-cold-fusion:test
Note: Output will be copied in your current directory name Python-Sample-Application
-
Pushing images to dockerhub
#log in to your dokcerhub account docker login docker tag <local_img_name> <docker_id/imagename:tag> docker push <docker_id/imagename:tag>
Note: Substitute
<local_img_name>
and<docker_id/imagename:tag>
acoordingly -
Verify if push was successfull
dokcer pull <docker_id/imagename:tag>
-
Staring docker compose
cd $CURDIR docker-compose up
Note: Incase UI is not visible exec into running container and run
curl http://127.0.0.1:7000/
-
Stop docker-compose
docker-compose down
```sh
cd $CURDIR/kubernetes
kubectl apply -f secrets.yaml
kubectl apply -f deployment.yaml
```
Note: After ensuring pods have started, direct your Web browser to the Uber-app at http://<HOST_IP>:<PORT>
.
- Sayuli Keny
- Apurva Sawant
- Siddhi Borkar
- Prasanna Kelkar