Judge0 CE is an open-source online code execution platform that supports more than 50+ programming languages. In this tutorial, we will guide you on how to install Judge0 CE on Kali Linux Latest.
Before we install Judge0 CE, we need to make sure Docker is installed on our system. To install Docker, run the following command in your terminal:
sudo apt install docker.io
Once done, check the Docker version:
docker --version
Now, let's clone the Judge0 CE repository from GitHub using the following command:
git clone https://github.com/judge0/judge0-ce.git
Once the repository is cloned, move to the cloned directory:
cd judge0-ce
In this step, we will build Judge0 CE image. To build the image, run the following command:
sudo docker build -t judge0:latest .
This command will take a few minutes to download and install the required dependencies.
Once the image is built, we can start the container by running the following command:
sudo docker run -d --restart always \
-p 80:3000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-e ADMIN_USERNAME=your_admin_username \
-e ADMIN_PASSWORD=your_admin_password \
-e JWT_SECRET=your_jwt_secret \
-e JWT_EXPIRATION=3600 \
-e DATABASE_URL=postgres://postgres:judge0@database:5432/judge0 \
-e RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/ \
--name judge0 judge0:latest
-d
option runs the container in the background.--restart always
option restarts the container automatically if it crashes or the system restarts.-p 80:3000
option maps the container port 3000 to the host port 80.-v /var/run/docker.sock:/var/run/docker.sock
option mounts the Docker socket from the host to the container. This is necessary for the Judge0 CE API to interact with Docker images.-e ADMIN_USERNAME=your_admin_username
option sets the admin username.-e ADMIN_PASSWORD=your_admin_password
option sets the admin password.-e JWT_SECRET=your_jwt_secret
option sets the JWT secret key.-e JWT_EXPIRATION=3600
option sets the JWT expiration time in seconds.-e DATABASE_URL=postgres://postgres:judge0@database:5432/judge0
option sets the PostgreSQL database URL. By default, Judge0 CE uses PostgreSQL as the database.-e RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
option sets the RabbitMQ URL. By default, Judge0 CE uses RabbitMQ as the message broker.--name judge0
option sets the container name to judge0
.judge0:latest
option specifies the image name and tag to use.Note: Make sure to replace the your_admin_username
,your_admin_password
and your_jwt_secret
values with your own.
To test if Judge0 CE is installed correctly, open your web browser and go to http://localhost
or http://your_server_ip
. You should see the Judge0 CE API documentation page.
In this tutorial, we have shown you how to install Judge0 CE on Kali Linux Latest using Docker. Judge0 CE is now ready to use for your online code execution needs.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!