Step-by-Step Docker Installation and Juice Shop Setup
Part 1: Installing Docker
- Docker Installation on Windows and macOS
Docker Desktop makes it incredibly easy to set up Docker on both Windows and macOS. Here’s a quick guide to get you started.
Steps for both Windows and macOS:
1. Download Docker Desktop:
Visit the Docker Desktop website and click “Download for Windows” or “Download for Mac,” depending on your operating system.
2. Install Docker Desktop:
On Windows, simply run the installer .exe file and follow the on-screen instructions.
On macOS, open the downloaded .dmg file and drag Docker to your Applications folder.
3. Launch Docker Desktop:
After installation, launch Docker Desktop.
Docker Desktop will guide you through the initial setup, and within a few clicks, Docker will be up and running.
- Verify Docker Installation:
Open PowerShell (Windows) or Terminal (macOS) and type:
docker --version
You should see the installed version of Docker printed in the terminal.
That’s it! Docker is now installed and ready for use. You don’t need to worry about additional steps since Docker Desktop handles everything, including setting up Docker Compose.
2. Docker Installation on Debian-based Linux (Ubuntu/Kali)
For Linux users (particularly Debian-based systems like Ubuntu or Kali), installing Docker is also straightforward.
- Update Your System: Open your terminal and run the following to ensure your system is up to date:
sudo apt update && sudo apt upgrade
- Install Docker: Install Docker using the following command:
sudo apt install docker.io
- Install Docker Compose: Since Docker Compose is often used alongside Docker, install it as well:
sudo apt install docker-compose
- Start and Enable Docker: Enable Docker to start at boot and launch it right away:
sudo systemctl enable docker
sudo systemctl start docker
- Verify Installation: Run the following command to check if Docker is installed correctly:
docker --version
That's it for Linux! Docker and Docker Compose are now installed and ready for use.
Part 2: Pulling and Running Juice Shop with Docker
Now that Docker is installed, let's set up the Juice Shop container.
Steps to Set Up Juice Shop in Docker:
Open Your Terminal (or PowerShell on Windows):
Pull the Juice Shop Docker Image: Run the following command to pull the latest Juice Shop image from Docker Hub:
docker pull bkimminich/juice-shop
- Run the Juice Shop Container: Use this command to run the container in the background and make it accessible from your browser:
docker run -d -p 3000:3000 --name juice-shop bkimminich/juice-shop
-d: Runs the container in the background (detached mode).
-p 3000:3000: Exposes port 3000 on your machine and maps it to port 3000 in the container.
--name juice-shop: Names the container "juice-shop."
- Access Juice Shop in Your Browser: Open your web browser and navigate to:
- Verify Juice Shop is Running: To ensure the container is running, you can check by using:
docker ps
This will list the currently running containers, and you should see "juice-shop" in the list.
- Stopping and Restarting Juice Shop:
To stop the Juice Shop container, run:
docker stop juice-shop
To restart it:
docker start juice-shop
Conclusion
With Docker now easily installed and Juice Shop running, you’re ready to explore the various vulnerabilities that Juice Shop presents. The setup is designed to be accessible for all platforms, and you can now start practicing hacking. (this is a great place to start of you are interested in bug bounty "hacking")
In our next post, we’ll start exploring specific challenges in Juice Shop and guide you through solving them.
Hax the rubix leave the cube.
Top comments (0)