-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker_cmd.sh
More file actions
21 lines (14 loc) · 725 Bytes
/
Copy pathdocker_cmd.sh
File metadata and controls
21 lines (14 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Step 1: Build docker Image
docker build --rm -f "dockerfile" -t docker_webapi:v2 .
#Step 2: Verify docker Image
docker images
#Step 3: Run docker Image
#Explanation: docker run --name <container-name> -d -p <external-port>:<container-internal-port> <docker-image-name>:<tag-name>
docker run --name temp-dockerwebapi2 -d -p 8082:80 docker_webapi:v2
#Step 3.1 Map local docker image to GitHub artifactory
docker tag docker_webapi:v2 harshalschaudhari/dockerwebapi
#Step 3.2 Push local docker image to GitHub artifactory
docker push harshalschaudhari/dockerwebapi
#Step 3.3 : Create thefile docker-compose.yml
#Step 4: Run docker Image based on YAML (Should be in current folder of docker-compose.yml)
docker-compose up