SHocker is a basic container runtime written in Bash shell. It provides simple commands to create, run, list, delete, and prune containers based on Docker images. This project is intended as a learning tool and is not recommended for production use.
- Create a container from a Docker image
- Run commands inside a container
- List all containers or images
- Delete specific containers or images
- Prune all containers and images with confirmation
- Bash shell
curl
to pull from the Docker Hubjq
for parsing JSON results from curltar
for extracting image layerssudo
for certain operations
Clone the repository and navigate to the project directory:
git clone https://github.com/beehivesystems/shocker.git
cd shocker
chmod +x shocker
To pull an image from the Docker Hub:
./shocker pull <image:tag>
To create a new container from a Docker image:
./shocker create <image:tag>
To run a command inside an existing container:
./shocker run <container_id> <cmd>
Example:
./shocker run 1234567890 /bin/sh -c "echo Hello from SHocker."
To list all containers:
./shocker container ls
To delete a specific container:
./shocker container rm <container_id>
To delete a specific image:
./shocker image rm <image:tag>
To remove everything:
./shocker prune
Contributions are welcome! Please fork this repository and submit a pull request.
SHocker is a simple, educational tool and should not be used in production environments. It is designed to demonstrate basic container operations and is not secure or optimized for performance or stability.
This project is licensed under the MIT license.