CS50 IDE Offline

Normally, the CS50 IDE requires a constant connection to the internet. This may not fit users with slow or unstable internet connections, or those who want to continue using the IDE offline for any number of reasons. The following instructions walk you through how to download and install the offline version of the CS50 IDE.


Installing the IDE

The CS50 IDE Offline is a containerized app. We need to install a platform called Docker to run and manage our CS50 IDE.

Linux

Follow the instructions for your Linux distribution to install the Docker Engine.

  1. Open up a Terminal window and run the following command to create a new CS50 IDE instance

    $ docker run --privileged -e "OFFLINE_IP=127.0.0.1" -e "OFFLINE_PORT=8080" --name ide50 -d -p 5050:5050 -p 8080-8082:8080-8082 cs50/ide50-offline
  2. Visit http://localhost:5050 in your favorite browser to access the CS50 IDE.

Mac

Note
If these system requirements are not met, skip to Docker Toolbox.
  1. Install Docker for Mac.

  2. Open up a Terminal window and run the following command to create a new CS50 IDE instance

    $ docker run --privileged -e "OFFLINE_IP=127.0.0.1" -e "OFFLINE_PORT=8080" --name ide50 -d -p 5050:5050 -p 8080-8082:8080-8082 cs50/ide50-offline
  3. Visit http://localhost:5050 in your favorite browser to access the CS50 IDE.

Windows

Note
If these system requirements are not met, skip to Docker Toolbox.
  1. Install Docker for Windows.

  2. Open up a Command Prompt window and run the following command to create a new CS50 IDE instance

    $ docker run --privileged -e "OFFLINE_IP=127.0.0.1" -e "OFFLINE_PORT=8080" --name ide50 -d -p 5050:5050 -p 8080-8082:8080-8082 cs50/ide50-offline
  3. Visit http://localhost:5050 in your favorite browser to access the CS50 IDE.

Docker Toolbox

Note
You should only follow these instructions if you are a Mac or Windows user and the system requirements for Mac or Windows, respectively, are not met.
  1. Download and install Docker Toolbox on your Mac or Windows.

  2. Open up the Docker QuickStart Terminal app that was installed on your computer. After a while, you should see something like the following, with a command prompt below it Docker QuickStart Terminal

  3. The IP stated in the screenshot above is the IP of the Docker machine. It may be different on your computer. You are going to use this IP to access your CS50 IDE, so you should record it.

  4. Run the following command in the Docker QuickStart Terminal to create a new CS50 IDE instance

    $ docker run --privileged -e "OFFLINE_IP=$(docker-machine ip default)" -e "OFFLINE_PORT=8080" --name ide50 -d -p 5050:5050 -p 8080-8082:8080-8082 cs50/ide50-offline
  5. Visit http://<machine-ip>:5050, in your favorite browser, to access the CS50 IDE, after replacing <machine-ip> with the actual IP for the Docker machine per this step.

Tip
If you ever forgot or lost the IP of the Docker machine, you should be able to get it back by running docker-machine ip default in the Docker QuickStart Terminal.

Managing the IDE

Starting the IDE

If you can’t access your CS50 IDE (e.g., after restarting your computer), it’s possibly because it’s stopped. To start it back, open up a Terminal window (if using Mac), a Command Prompt (if sing Windows), or Docker QuickStart Terminal (if using Docker Toolbox), and run the following command

$ docker start ide50

Restarting the IDE

Normally, you shouldn’t need to restart the IDE, but if you ever wanted to open up a Terminal window (if using Mac), a Command Prompt (if sing Windows), or Docker QuickStart Terminal (if using Docker Toolbox), and run the following command

$ docker restart ide50

Stopping the IDE

To stop the CS50 IDE open up a Terminal window (if using Mac), a Command Prompt (if sing Windows), or Docker QuickStart Terminal (if using <<docker-toolbox>), and run the following command

$ docker stop ide50

Removing the IDE

To remove the CS50 IDE instance, ensure the IDE is stopped (see Stopping the IDE), then open up a Terminal window (if using Mac), a Command Prompt (if sing Windows), or Docker QuickStart Terminal (if using Docker Toolbox), and run the following command

$ docker rm ide50

Where to Go Next?

You may read the guide on how to use the CS50 IDE!

results matching ""

    No results matching ""