Hey everyone! I know this might seem like a basic question, but I'm curious about the criteria you use for picking Ubuntu base images when creating a custom Dockerfile. I've been working on a personal project during my time off, where I built a simple Python tool with Connexion that I want to dockerize for use in my Compose stack. This tool acts as a health checker and performs other tasks based on a TOML configuration file. I'd like to build my Docker image using Ubuntu so I can easily access bash and run some CLI commands I'm developing with Typer, all while keeping the image as lean as possible. Which Ubuntu base image would you suggest?
3 Answers
I hear you; Ubuntu might seem a bit heavier at around 80MB compared to other images, but having that capability for debugging is really worth it. Sometimes a slightly larger image can save you a lot of hassle down the line.
You might want to start by checking out the tags for the official Python image on Docker Hub. Generally speaking, most people lean towards either Debian or Alpine for their base images. If you decide to go with Debian, it comes with a bash shell, which can be super helpful. Do you have any other specific requirements for your project?
For me, the compatibility with glibc really makes Ubuntu a better choice over Alpine. Alpine can be quite limiting for development, but maybe that’s just my bias from using Ubuntu. Overall, I think going with Ubuntu is a good call if you want more flexibility.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically