examples
Lean and Mean Docker containers
examples | Lean and Mean Docker containers | |
---|---|---|
3 | 39 | |
158 | 18,287 | |
0.0% | 1.2% | |
6.5 | 9.0 | |
3 months ago | 11 days ago | |
Shell | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
examples
-
Optimize Your Containerized App with SlimToolkit
Get full examples on github
-
DockerSlim – Optimize Your Containerized App Dev Experience
What kind of images do you have? App images or base images? What's the stack for your image if it's an app image? Is it a server app or a cli app? Do you mind sharing your failures?
By the way, have you looked at the examples? https://github.com/docker-slim/examples Wonder which example is close enough to what you have.
Depending on the command you choose (e.g., "build" or "xray") it's doing different things. With "xray" it's all static analysis where it saves the images and then it analyses it internals. With "build" it performs static and dynamic analysis where it creates a temporary instance of your container. By default, it assumes it's a server app and it'll try to probe your server app when it's running.
-
Right way to deploy Go API in a Docker?
You see this a lot because it's easy and convenient. It's not because it's the best/recommended thing to do. You can use multi-stage builds where you copy everything you need from the build stage to the release stage. It works fine as long as you have a simple application and you know exactly what you need from the build stage. It gets tricky with more complex applications. Another option to try is DockerSlim. It allows you to take those less than ideal container images you see a lot and make them as small as possible. Take a look at this Go application example: https://github.com/docker-slim/examples/blob/master/3rdparty/mux-go-api/Dockerfile
Lean and Mean Docker containers
-
Optimize Your Containerized App with SlimToolkit
SlimToolkit empowers developers to create better, smaller, and more secure containers without sacrificing their existing workflows. Explore the project on GitHub or visit the official website to learn more.
-
Is updating software in Docker containers useful?
And if you want to make the container quickly secure without bloats, maybe give this a try https://github.com/slimtoolkit/slim
-
An Overview of Kubernetes Security Projects at KubeCon Europe 2023
Slim.ai presents the data in a more user friendly way than many of the other tools in this post. On top of its open source SlimToolkit for identifying the contents of an image, Slim.ai uses Trivy for vulnerability scanning.
-
Tips for reducing Docker image size
What about https://github.com/slimtoolkit/slim?
-
package a poetry project in a docker container for production
A last practice that I do not use at all and which may interest you is to use slim toolkit to keep only the useful elements in your final image.
-
Standard container sizes
Anyone tried using https://github.com/docker-slim/docker-slim To minify an image?..
- DockerSlim - Optimize Your Containerized App Dev Experience. Better, Smaller, Faster, and More Secure Containers Doing Less! Minify Docker Images by up to 30x.
- A practical approach to structuring Golang applications
- How to optimize docker image size?
-
M1: Docker doesn't find shared x64 shared objects even though platform was specified
Distroless images are better left for people with serious need for lightweight images and good Linux knowledge because they require lot of planning with the build so that they stay light and work. If you need lighter images but docker isn't your main tool and you can't afford to take hours and hours of practicing different build strategies you can check docker-slim (https://dockersl.im/). With this tool you can easily size down the images.
What are some alternatives?
distroless - 🥑 Language focused docker images, minus the operating system.
minideb - A small image based on Debian designed for use in containers
rootcerts - Go package to embed the Mozilla Included CA Certificate List
Go random string generator - Flexible and customizable random string generator
golang-sample-app - Example application with Golang and Docker
pipx - Install and Run Python Applications in Isolated Environments
ko - Build and deploy Go applications
dive - A tool for exploring each layer in a docker image
gophish - Open-Source Phishing Toolkit
simple-scrypt - A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go 🔑
memguard - Secure software enclave for storage of sensitive information in memory.
MeTube - Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)