Skip to content

Using with Docker on Mac

Brian Dietz edited this page Apr 19, 2024 · 6 revisions

Build image

  1. Make sure Docker Desktop is installed and running.
  2. Change the current working directory to where you'd like the cloned directory: cd $HOME/Documents
  3. Run git clone https://github.ncsu.edu/bjdietz/bdap.git && cd bdap
  4. Depending on your chip architecture, run one of the two following build commands:
    • AMD: docker build -f Dockerfile_ubu22_amd --build-arg USERNAME=$(whoami) -t ubuntu:bdap .
    • ARM: docker build -f Dockerfile_ubu22_arm --build-arg USERNAME=$(whoami) -t ubuntu:bdap .
    • To edit GROUPNAME, pass the value using --build-arg.
  5. Wait for image to build.

Basic usage

  1. After you've built the image, you should be able to run a command like docker run -it --rm ubuntu:bdap /bin/bash to start the container and enter in a shell. The --rm option will remove the container once you've exited it.

Production usage

  1. Run sed -i '' '2s/^/uuid=1234\n/' .env, replacing 1234 with your own uuid.
  2. If you're not using SCRC's born-digital working storage, you can uncomment and use the storage variables in the .env file.
  3. Make sure the image name in docker-compose.yml is what you used when building your image (focal:bdap).
  4. From same directory where Dockerfile is, in terminal, run docker-compose up -d
  5. When returned to prompt, run docker-compose exec bdap bash
  6. When done, in same directory, run docker-compose stop

Note: If you're committing your .env changes to your own repository, open the .gitignore file and uncomment .env.

Clone this wiki locally