-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Savithru Lokanath edited this page Aug 4, 2018
·
1 revision
-
Download Docker on your laptop
-
Verify Docker is running
(laptop)# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
Create a new folder called
findr-app
& download the 2 files,Dockerfile
&entrypoint.sh
NOTE: We are going to pull & commit to
dev
branch, so make sure to pull from the right branch -
Create the
findr-app
container(laptop)# cd findr-app (laptop)findr-app# ls Dockerfile entrypoint.sh (laptop)findr-app# docker build -t findr-app .
If successfull, you will see something like this
... ... Step 6/6 : WORKDIR /findr Removing intermediate container 255e254c8218 ---> 2a5157965788 Successfully built 2a5157965788 Successfully tagged findr-app:latest
-
Once the container is built, verify that the image is present
(laptop)findr-app# docker images | grep -i findr findr-app latest 2a5157965788 2 minutes ago 531MB
-
Run/Start the container & verify
(laptop)findr-app# docker run -itd -p 8080:8080 --name findr-app findr-app 559832a3376f5d44bee3ea4d10b7bba6f99f68f1af920b4ef08fc3dcea967cf6 (laptop)findr-app# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 559832a3376f findr-app "/bin/bash" 1 second ago Up 4 seconds 0.0.0.0:8080->8080/tcp findr-app
-
Once verified, login to the container
(laptop)findr-app# docker exec -it findr-app bash root@559832a3376f:/findr# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
-
Clone the repo & run
entrypoint.sh
root@559832a3376f:/findr# git clone https://gitlab.com/pongbot/findr.git -b dev root@559832a3376f:/findr# ./entrypoint.sh
-
Verify that the app is running
root@559832a3376f:/findr# netstat -alnp | grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 57/python