- Basics of Docker. If you are not familiar with docker please watch this video.
- Docker Desktop needs to be installed on your machine. You can refer to the installation guide from Docker for the same for your specific machine.
- Linux Based: Ubuntu 24:04
- Java Version: JDK 22
- GCC/C++ Compiler
- Build Tools: Gradle for Java and CMake for C++
A Docker dev environment allows developers to work with consistent, isolated setups that can be easily shared and deployed across different machines and platforms
In your working directory for your code which you want to make accessible to the container, download the Dockerfile
and compose-dev.yaml
from this repo.
Your folder should now have both of the above-mentioned files.
Open Docker Desktop and navigate to Dev Environments situated in the left panel.
Click on Create to start creating a new dev environment
For the Setup section give the container any name you prefer and set the path to the directory with the Dockerfile
and compose-docker.yaml
files.
Click next and Docker will create your environment.
From Docker Desktop run the docker dev container by clicking on the Play button.
To open the interactive terminal for the container:
Get the container id:
docker ps
My Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
771625b30774 ubuntu-dev-e6-app "sleep infinity" About an hour ago Up 9 seconds ubuntu-dev-e6-app-1
Copy the container id from the CONTAINER ID column for your particular dev container name.
docker exec -it <container_id_or_name> /bin/bash
This opens the internal BASH for the container.
You can refer to this link for instructions on how to run directly on the docker image.
Set the Context Folder to the directory with the previously downloaded Dockerfile
.