Skip to content
Nick Winter edited this page May 4, 2023 · 5 revisions

Getting started with Docker and CodeCombat

Docker can be confusing in the beginning, but it is quite simple to get started with. In a nutshell, it is a way to run small computers inside your computer. Those computers can have their own setup, so you don't have to do all the setup yourself - it's already done inside that smaller computer!

To use Docker with CodeCombat, you'll need a few things set up first.

  • docker itself, which is the program that runs those smaller computers
  • docker-compose, which is a neat way to use configuration file to run those smaller computers together on your machine
  • The CodeCombat source code (this Github repository!)

Optionally, you could directly download the Docker image and run it, but that is strictly the latest changes. You can't make any modifications, and it's not that useful to work with.

Step-by-step guide

  1. Install Docker
  2. Clone (download) the CodeCombat github repository
  3. In your terminal, go inside of the downloaded CodeCombat repository. It has lots of files and folders. You should see a "docker-compose.yml" file there, and that's the most important.
  4. Run the command docker-compose up right there in the terminal. It will do everything you need, and you'll see some text like this (but probably without the fancy colors!) when it's done:

Docker example output

And then you're up and running! Go to http://localhost:7777 to visit the page.

Notes

The levels, all the data, your account and everything else lives on codecombat.com. It is the same stuff you see there, as you will see on http://localhost:7777, except that the code in your local folder will be used instead.

This means that all of these things will remain on codecombat.com, even if you modify them on http://localhost:7777

  • Creating or changing a Level, ThangType, Component and so on
  • Playing the game and making progress
  • Changing the name on your user profile
  • Joining a classroom

Troubleshooting

  • If docker-compose up doesn't work, make sure Docker compose is set up too (it should be part of your Docker install)
  • If you get an error when going to http://localhost:7777 it may be something you've changed in your local folder that is the problem. If you have made changes (type git status or git diff), see if that could be the reason
  • See if others may be able to help you on Slack or https://discourse.codecombat.com/
Clone this wiki locally