At the time of writing, need to install Docker For Mac Edge
Sample application: alexellis2/href-counter
A Golang example application which counts internal vs. external hrefs within a page to rate SEO.
docker run --rm -e url=https://news.ycombinator.com alexellis2/href-counterNote: Needs internet to get html from url...
Build sdk image
docker build -t alexellis2/href-counter:sdk . -f Dockerfile.build
Look at size of image
docker images |grep href-counter
Size of layers added ~20MB
docker history alexellis2/href-counter:sdk |head -n 4Use builder pattern:
cat build.shNow run old builder pattern
./build.shConfirm new final image is much smaller
docker images |grep href-counterInstead of using a shell script to orchestrate two separate Dockerfiles, we can just use one and define stages throughout.
cat Dockerfile.multiSample Hello world app
cd ../hello
docker build -t hello-world-lab .Resulting image is very small
docker images |grep hello-world-labConfirm image works
docker run --rm hello-world-lab- Docker Cloud UI (takes about 10min)
- AWS Stacks
Setting up Docker cloud instructions
Overview of all components making up Docker stack.
Highlights:
- secrets.
- Node identity, MTLS and encrypted networking
- LinuxKit
- Moby
- multi-stage builds: bash script was hacky and broke
- desktop to cloud: giving a user access is as easy as using the docker cloud UI (Created an org, add teams - set team permissions to clusters)
- Note that the
Desktop To Cloudfeature configures yourDOCKER_HOSTto work with the swarm in the cloud.


