-
Notifications
You must be signed in to change notification settings - Fork 0
Container Tutorial
In this tutorial I will show you how to setup a docker container environment with a persistent volume
-
Download VSCode For Windows, Mac, Linux
-
Install Remote Development Extension Pack

-
To download the gradle image, open a Terminal/Powershell and type:
`docker pull gradle`
-
After the image is done downloading, now its time to create the container with a persistent volume:
You will need to change desired_path to the path you want to mount, in this example I will use /home/ed/Documents/cse3341/
`docker create -it --entrypoint /bin/bash --name cse3341 -v desired_path:/home/gradle/ gradle -s`
-
Start the container you just created:
`docker start cse3341`
-
To attach to a running In Visual Studio Code, click on the green extension on the bottom left and then select attach to a running container.

-
To add a new working directory, go to File -> Add Folder to Workspace... and then select your path. In this example the path is /home/gradle/

Testing out the persistent volume:

Testing out python and java:

To see a list of all containers: docker ps -a
To see a list of running containers: docker ps
To stop a running container: docker kill container_name or container_id
To start a stopped container: docker start container_name or container_id
To attach your current terminal to a container: docker attach container_name or container_id