Skip to content

Installation with Docker

William Washington edited this page Jul 25, 2024 · 51 revisions

First, install Docker (your workstation): Windows, Mac, Ubuntu, Other

If you're on a Mac, you will need to run Docker.

If you're using Ubuntu, you'll need to be root.

If you're on Windows, you'll need to run bash and make sure Docker is in your PATH.

If you're reinstalling with the same directory that previously had a docker build, you'll need to delete your project/ folder. Be sure to git stash any changes that you want to keep ahead of time that aren't committed.

Navigate to the directory that you want your MyUW installation to reside within in terminal and run the following commands:

git clone https://github.com/uw-it-aca/myuw   
cd myuw

Check out the branch you want:

git checkout <branch name>

Build the docker container using:

docker compose up --build

If you're running Docker on your local machine, you can visit your build at the following URL:

localhost:8000

To bring your server down:

docker-compose down

If that doesn't work, try clearing your system cache using 1 of the following commands:

docker system prune -a
docker system prune --volumes

If you're on Ubuntu, you may need to do the following:

sudo chown -R USERNAME:GROUP .

Replace USERNAME with your username and GROUP with your group.

To run your Docker build on AXD3:

  1. Set up your local myuw repository (ie, in ~/work/ directory):

    git clone https://github.com/uw-it-aca/myuw

    cd myuw

  2. Build a Docker image:

    sudo docker build --network host -t <your-docker-image-name> .

  3. Run your personal build in a Docker container:

    sudo docker run --network host -e PORT=<the-port-number-you-use-on-axd3> -v ~/work/myuw:/app/myuw/ -u myuw <your-docker-image-name>

    To give your container a name, add the following in docker run command:

    --name <your-container-name>