A containerized environment that provides Podman capabilities within a Docker container, designed for development and testing purposes.
docker run -d \
--name podman-environment \
--privileged \
--hostname podman-environment \
--volume home:/root \
--cgroup-parent docker.slice \
-p 2222:22 \
docker.io/h4shelldocker/podman-environment
Once the container is running, you can access it via SSH:
ssh -p 2222 root@localhost
Default Credentials:
rootpasswordFor improved security and convenience, you can set up SSH key authentication:
# Copy your SSH public key to the container
ssh-copy-id -p 2222 root@localhost
After setting up SSH keys, you can connect without entering the password each time.
You can use this environment directly in VS Code with the Remote Explorer plugin for seamless development.
Add the following configuration to your SSH config file ($HOME/.ssh/config):
Host podman-environment
HostName localhost
User root
Port 2222
Ctrl+Shift+P or Cmd+Shift+P)podman-environment from the listdocker.io/alpine:latestpodman - Container enginepodman-compose - Docker Compose equivalent for Podmancgroup-tools - Control group utilitiesiptables - Network packet filteringopenssh-server - SSH server for remote accessgit - Version control systemsudo - Privilege escalationcurl - Data transfer utilitynano - Text editorAfter SSH access, you can use Podman commands:
# Check Podman version
podman --version
# List containers
podman ps
# Pull an image
podman pull alpine
# Run a container
podman run -it alpine /bin/sh
# Start the container
docker start podman-environment
# Stop the container
docker stop podman-environment
# Remove the container
docker rm podman-environment
# View logs
docker logs podman-environment
⚠️ Important Security Notes:
After first login, change the default password:
passwd root
docker psdocker port podman-environment/
├── usr/bin/entrypoint.sh # Container startup script
├── etc/ssh/sshd_config # SSH daemon configuration
└── root/.ssh/ # SSH keys directory
The container supports the following build-time variables:
ENV_USER: Default user (default: root)ENV_PASS: Default password (default: password)GIT_NAME: Git username (default: h4shell)GIT_EMAIL: Git email (default: [email protected])home:/root - Persistent storage for the root user's home directoryThis container is maintained by h4shell.
Content type
Image
Digest
sha256:c79330459…
Size
87.8 MB
Last updated
about 1 year ago
docker pull h4shelldocker/podman-environment