docker build -t imgname .
docker run --name container_name imgname --bind 127.0.0.1
docker run -d --name container_name -p 8888:8888 img_name
docker run -d --name container_name -p 8888:8888 --restart unless-stopped image_name
docker restart container_name
docker rm containerid
docker rmi imageName
FROM anapsix/alpine-java
MAINTAINER bhushanp
COPY badam7-0.0.1-SNAPSHOT.jar /home/badam7-0.0.1-SNAPSHOT.jar
CMD ["java","-jar","/home/badam7-0.0.1-SNAPSHOT.jar"]
expose 8888 ### only used for inter-container communication
- To create a volume -- docker volume create [name of volume]
- To verify volume -- docker volume ls
- To delete volume -- docker volume prune
- If you want to remove a single volume you can do so by typing: -- docker volume rm [name of volume]
- See more details on our created volume and probably most important where it will place the persisted files. -- docker inspect [name of volume]
- To mount volume to app -- docker run -d -p 8000:3000 --name my-container --volume my-volume:/logs chrisnoring/node (-v, —-volume, the syntax looks like the following -v [name of volume]:[directory in the container], for example -v my-volume:/app)
- Bring down the container(docker stop container_name)
- remove it (docker rm container_name)
- rebuild the image (docker build -t imagename)
- run the container again. (docker run -d --name container_name -p 8888:8888 image_name)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Content-Type", "application/x-www-form-urlencoded")
$body = "sess=dsfadssafsd&empid=%22a%22"
$response = Invoke-RestMethod 'kotak-staging.mobcast.in/external/validate/token' -Method 'POST' -Headers $headers -Body $body $response | ConvertTo-Json