Skip to content

About

A ~20min intro to colima + docker for macOS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Colima + docker demo

A quick intro to Colima (Containers on Linux Machines) for macOS

Table of Contents


Installation

(requires homebrew, pay attention to the brew Caveats :))

Install colima

brew install colima

Install docker

brew install docker docker-compose docker-buildx

Demo

Getting started

  1. Start up colima and docker with a default colima profile
colima start

Note: This is the same as running colima start default

  1. Take a look at the default VM
colima status --extended
  • by default colima allocates 2 cpu and ram
  • Same as running colima status default --extended
  1. We can change the default
# stop the default vm if running
colima stop # or colima stop default

# starting default but with new config
colima start --cpus 4 --memory 8

# take a look at profiles
colima list

Setting up different profiles

  1. Create some new profiles by providing a name
# creating 2 profiles
colima start bigger --cpus 6 --memory 12
colima start mini --cpus 1 --memory 2

take a look colima list or the statuses for each profile

colima status --extended
colima status default --extended # same as above
colima status bigger --extended
colima status mini --extended

can also stop or start using the profile names

colima stop default
colima stop bigger
colima stop mini
  1. Choosing the vm to use
# if the profile is not already started
colima start mini

# use that context 
docker context use colima-mini

you can check which context is being used via docker context ls

Using docker

as you usually would basically :)

  1. like docker's hello-world
docker run hello-world
  1. from docker hub e.g. rancher/cowsay
docker pull rancher/cowsay
docker run rancher/cowsay yo
  1. Docker build: the sparkle.Dockerfile demo
# build it 
docker build -f sparkle.Dockerfile -t sparkle .

# run it 
docker run sparkle 'Hello world'
  1. Docker compose: a website at http://localhost:8080
docker-compose up --build -d 

then go to browser


Links

Thank you

Thank you to the above resources and for your attention :)

About

A ~20min intro to colima + docker for macOS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages