Skip to content

th-blitz/my-docker-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My-Docker-Images

  • A collection of my frequently used docker images.
  • These are used in my projects, applications testing and as my primary workspace.

Instructions to setup the docker image.

1. Make sure to run all the commands from the project root directory.

cd /My-Docker-Images

2. Select an Image from the list.

MyDockerImage="ros-melodic"

3. Build the docker image 'leetcode' from the docker file leetcode.Dockerfile.

docker build -t $MyDockerImage -f $MyDockerImage/$MyDockerImage.Dockerfile $MyDockerImage

Building the image may take 5 to 15 mins. This is done only for the first time.

4. Run a container called leetcode from the built image.

For windows cmd

docker run --rm -d -t --name $MyDockerImage -v %cd%:/home/mount $MyDockerImage 

For Mac terminal OR windows powershell

docker run --rm -d -t --name $MyDockerImage -v ${PWD}:/home/mount $MyDockerImage

For linux terminal

docker run --rm -d -t --name $MyDockerImage -v $(pwd):/home/mount $MyDockerImage

5. Open a interactive terminal from the running leetcode container.

docker exec -ti $MyDockerImage bash