Skip to content

Using with Docker on Windows

ShellyYBlack edited this page May 22, 2024 · 5 revisions

Build image

  1. Make sure Docker Desktop is installed and running.
  2. In Powershell, 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. Run docker build -f Dockerfile_ubu22_amd --build-arg USERNAME=$([System.Environment]::UserName) -t ubuntu:bdap .
  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. Create a volume pointing to your NFS storage: docker volume create --driver local --opt type=nfs --opt o=addr=lib-scrc-files.lib.ncsu.edu,nfsvers=4,rw,soft,nolock --opt device=:/archives/working/born_digital born-digital
  2. Run (Get-Content .env).replace("userID=`$USER", "userID=$env:username") | Set-Content .env. If you're not using SCRC's born-digital working storage, you can uncomment and use the storage variables in the .env file.
  3. From same directory where Dockerfile is, run docker-compose -f windows.yml up -d
  4. When returned to prompt, run docker-compose exec bdap bash
  5. 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