Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.16 KB

docker_notes.md

File metadata and controls

46 lines (37 loc) · 1.16 KB

Rudimentary notes on Docker

Linux and intel processor Macs

# Set up docker env (only needed if you use command line docker-machine)
docker-machine start
eval $(docker-machine env default)

# Create container
docker build -t varikn_test_container .
# Log in container
docker container run --interactive --tty varikn_test_container
# Inside container
mkdir build; (cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=1
  && make && ctest --verbose)

# clean up
docker image rm varikn_test_container
docker machine stop

Notes for mac docker setup

# Install needed Homebrew packages
brew install docker docker-machine
brew cask install virtualbox
# Create VM
docker-machine create default

Apple processor Macs (M1, M2)

On Apple silicon processor based mac (M1, M2), you can install Finch and run the following:

# Create container
finch build -t varikn_test_container --platform=Linux/amd64 .
# Log in container
finch container run --interactive --tty varikn_test_container
# Inside container
mkdir build; (cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=1
  && make && ctest --verbose)