Skip to content

Sample project for the Tilt getting started tutorial

Notifications You must be signed in to change notification settings

dockersamples/avatars

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Samples :: Avatars 🤪

Avatars is a small sample project for Docker demonstration purposes.

It consists of a Python web API backend to generate avatars and a Javascript SPA (single page app) frontend. If you are not a Python or Javascript guru, don't panic!

Usage

To get started, clone this repository locally:

git clone https://github.com/dockersamples/avatars.git

All subsequent commands assume they are run from the root repository directory (i.e. avatars/ folder).

Run make help to see a list of available targets.

Tilt

You'll need to first install Tilt and prerequisites (Docker + development Kubernetes cluster).

Run tilt up or make tilt. All resources will be deployed to the namespace and cluster as determined by the active Kubernetes config context.

Docker Compose with file watch

Run make compose.

Compose launches the services and attaches in file watch mode. Run docker compose -p avatars logs -f from a separate terminal to stream logs.

Kubernetes (Docker Desktop)

ℹ️ If you haven't already, open the Docker Desktop dashboard and enable Kubernetes from Settings > Kubernetes > ☑️ Enable Kubernetes and apply.

Run make kubernetes. All resources will be deployed to the avatars namespace in the docker-desktop Kubernetes cluster.

Buildx builds images and Kubernetes creates Deployments and Services. The images are not pushed to a registry, as Docker Desktop's Kubernetes integration runs the images directly from the Docker Engine image store using cri-dockerd (formerly known as dockershim).

Run `kubectl --context=docker-desktop --namespace=avatars logs -l='app.kubernetes.io/part-of=dockersamples_avatars' from a separate terminal to stream logs.

Simple Compose Watch Test

git clone https://github.com/dockersamples/avatars
cd avatars
docker compose up -d

Initiate the Watch

docker compose watch

Generate a graphviz graph from your compose file

docker compose alpha viz

About

Sample project for the Tilt getting started tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 38.2%
  • Starlark 21.8%
  • Python 17.2%
  • CSS 9.9%
  • Makefile 5.8%
  • Dockerfile 3.7%
  • Other 3.4%