-
Notifications
You must be signed in to change notification settings - Fork 53
Docker Setup Instructions
Download and install Docker Desktop for macOS or Docker Desktop for Windows. Once installed, you must launch the Docker Desktop app in order to use Docker via the terminal. Docker is now fully setup and ready to use!
Open a new terminal session. Run the following command to install Docker:
curl -fsSL get.docker.com | sudo sh
Once installed, run the following command to enable Docker under your user account:
sudo usermod -aG docker $USER
After enabling your user account, logout and log back in for the changes to take affect. Then run the following command to install Docker Compose:
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
Docker is now fully setup and ready to use!
Important Note: Postgres must be run through a terminal session, i.e. not through a graphical application that runs Postgres on its own. Otherwise, Docker will be unable to connect to the Postgres server.
If you don't have Postgres installed, see the readme at the root of the Shuttle Tracker directory for instructions on how to install it.
- For Linux/WSL users, see instructions 3-4.
- For macOS users, see instruction 3.
- For Windows users, see instruction 6.
- Clone or download the Shuttle Tracker repository to your local machine
- Be sure Docker Desktop is open so that you have access to Docker commands via the terminal.
- Open a new terminal session and navigate to the Shuttle Tracker root directory
- Run the following command to download Shuttle Tracker dependencies and compile files:
docker build -t shuttletracker .
- Run the following command to start Shuttle Tracker:
docker run shuttletracker
- If Docker is having trouble connecting to the Postgres database, try using
host.docker.internal
instead oflocalhost
in the Postgres URL inconf.json
. - If your browser is unable to find the server when navigating to
localhost:8080
, try starting Shuttle Tracker withdocker run -p 8080:8080 shuttletracker
. - If your browser indicates that the connection was unexpectedly dropped when navigating to
localhost:8080
, try using0.0.0.0:8080
instead oflocalhost:8080
for the listen URL in the config file. - If changes to
conf.json
are not reflected in the application's configuration, don't forget to rebuild the project.