-
Brittany Faciane authoredBrittany Faciane authored
Development Guide
Overview
Workspaces' services run on Docker containers. These containers can be all started at once using Docker Compose.
Setup
Build the base image:
docker build -t brooks.aoc.nrao.edu:5000/ssa-docker/workspaces/base:local -f Dockerfile.base .
This builds a local Docker image tagged as brooks.aoc.nrao.edu:5000/ssa-docker/workspaces/base:local
on your machine
using the Dockerfile.base
Dockerfile. Once the image has been built, Docker will save this image on your machine.
Next, you will need to run a similar command for the cache image:
docker build --no-cache -t brooks.aoc.nrao.edu:5000/ssa-docker/workspaces/cache:local -f Dockerfile.cache . --build-arg BASE_IMAGE_TAG=local --build-arg BASE_REGISTRY_URL="brooks.aoc.nrao.edu:5000/ssa-docker/workspaces"
Starting Workspaces
To start a dev version of Workspaces as foreground process, run:
docker compose -f docker-compose.yml -f docker-compose.local.yml up
To start a porduction version of Workspaces as background process, run:
docker compose -f docker-compose.yml up -d
Stopping Workspaces
To stop Workspaces, run:
docker compose -f docker-compose.local.yml down
Starting Individual Services
To start Workspaces as foreground process, run:
docker compose -f docker-compose.local.yml up <service_name>
List Containers
To get a list of running containers:
docker container ls
Or:
docker ps
Show Container Logs
To output logs of a specific container:
docker logs <container_name>
To continuously tail logs of a specific container:
docker logs -f <container_name>
Open a Shell on a Running Container
Using Docker:
docker exec -it <container_name> bash
Using Docker Compose:
docker compose -f docker-compose.local.yml exec <service_name> bash
Run a command on a Running Container
Using Docker:
docker exec <container_name> pwd
Using Docker Compose:
docker compose -f docker-compose.local.yml exec <service_name> pwd