Level 5: Container Optimizer
If you want somewhere to work on this task, there are several desks with power
and Wifi right next to our booth at Pavilion 1, Zone Grapefruit, SU47 
- Install DockerSlim
- XRAY a container using DockerSlim
- View XRAY results with Slim.AI Developer Platform
- Optimise a container using DockerSlim
- Visit us at Pavilion 1 booth SU47 and show us your optimised container results, to collect your vintage Slim.AI socks
Here’s a quick start guide to help you complete this task
We’re happy to help you in person if you visit us at Pavilion 1 booth SU47 and answer any questions you might have about Slim.AI and DockerSlim 
1. Install DockerSlim
You can find comprehensive installation instructions for DockerSlim on GitHub, but you can use this script to install DockerSlim on Linux
(x86 and ARM) and macOS
(x86 and Apple Silicon)
curl -sL https://raw.githubusercontent.com/docker-slim/docker-slim/master/scripts/install-dockerslim.sh | sudo -E bash -
2. XRAY a container
First, pull the nginx
container
docker pull nginx:latest
docker-slim
XRAY creates a detailed view of container layer construction, contents and other metadata. The ourput from docker-slim xray nginx:latest
is verbose, but we can also create an XRAY and visualize this data, and more, in a human-friendly way using the Slim.AI Developer Platform.
3. View XRAY results with Slim.AI Developer Platform
docker-slim xray --export-all-data-artifacts . nginx:latest >/dev/null
Upload data-artifacts.tar
to https://portal.slim.dev/xrayupload. When the upload and analysis is complete, you can look at the container Overview, the File Explorer for the image of discrete layers and the Dockerfile.
4. Optimize a container using DockerSlim
You’ll find detailed documentation about how to optimize containers on the DockerSlim GitHub project and we also have a collection of DockerSlim example projects using various languages and frameworks.
docker-slim build nginx:latest
Congratualtions!
Execute docker images
and you’ll see the original nginx:latest
and optimized nginx.slim:latest
container images. Come and visit us at Pavilion 1, Zone Grapefruit, Booth SU47 to claim your vintage Slim.AI socks 
5. Bonus
You can now use the Slim.AI SaaS platform to search for container images across registries and then explore, analyze and optimize those container images.