This is a minimal viable product demonstrating how to use dev containers with Podman instead of Docker.
-
Ensures every developer works in the same environment, eliminating "it works on my machine" problems.
-
Dependencies, tools, and configurations are all containerized.
-
Since the development environment is containerized, the same container setup can be deployed to staging or production with minimal changes, streamlining the path from development to deployment.
-
Git Configuration
Ensure you have a global Git configuration. If not, run the following commands:git config --global user.name "Your Name" git config --global user.email "[email protected]"
-
Install Podman If you are using Fedorda at Red Hat, it should be preinstalled.
-
Install VSCode
-
Install vscode extensions Install the following extensions: dev containers.
-
Set docker path for VSCode Add "dev.containers.dockerPath": "podman" to the settings.json file in your User VSCode settings. Default location is at ~/.config/Code/User/settings.json.
- Clone the project
git clone [email protected]:morrison-turnansky/podman-dev-containers-mvp.git
- Enter the project in vscode
code ./podman-dev-containers-mvp
In the bottome left hand corner of the VSCode window there is a blue button, press on it and select reopen in container from the drop down menu.
You now have containerized environment. Git credentials will be copied from your host, so develop as your normally would.