r/docker • • Apr 12 '26

No one in Spain can docker pull right now because of the football

827 Upvotes

I just lost a couple of hours debugging what looked like a broken Docker setup, and it turns out its something much weirder (and honestly a bit concerning).

Symptoms:

  • docker pull ubuntu:latest hangs at Pulling fs layer

  • sometimes retries forever, sometimes unexpected EOF

  • no actual download progress

Basic checks all pass:

At first it looks like a Docker issue, but it isn't.

What’s actually happening:

  • Docker resolves the image fine (manifest step works)

  • then tries to download layers from a CDN (Cloudflare-backed storage)

  • that connection is being silently dropped / throttled

I found a Hacker News thread describing the exact same issue happening right now:
https://news.ycombinator.com/item?id=47738883

And this site explains why:
https://hayahora.futbol/

Some Spanish ISPs are blocking or interfering with Cloudflare/CDN IP ranges during football matches (anti-piracy court orders), and Docker image layers are served via those same networks.

So Docker works, but the actual layer download gets blackholed.

Proof:

  • using a VPN works instantly

So if your pulls are hanging at fs layer, it might not be:

  • your Docker install

  • your image

  • your auth

  • your network config

it might literally be your ISP interfering with CDN traffic.

Curious:

  • anyone else in Spain (or elsewhere) seeing this?

  • anyone running into this on CI runners or production infra?

Because this feels like a pretty big fuck up if true, Docker Hub/CDN infra getting caught in unrelated ISP blocking and no one able to work on a Sunday.

Would love to hear if others can reproduce.


r/docker • • Mar 15 '26

We just got breached because of vulnerabilities in our docker images that have been public knowledge for 8 months

751 Upvotes

Woke up at 4am to a call. Our database got hit, customer info was accessed. Some attacker used a known exploit in one of our container images. CVE’s been out since last summer.

Yeah we never scanned. Never updated. Just kept redeploying the same images over and over. Now legal’s in it, customers are hearing about it. This is gonna be messy.

Honestly if you aren’t scanning your containers in prod do it. Don’t end up like us.


r/docker • • Aug 26 '24 Heart of Silver

How I Reduced Docker Image Size from 588 MB to Only 47.7 MB - A whomping 91.89 %

674 Upvotes

To begin with, there is no secret here if you already know about the multi stage builds.

We all know minimizing docker image sizes accelerates container deployment, and for large-scale operations, this can lead to substantial savings in storage space.

  1. For a flask app, I picked up Python 3.9-alpine which is a whomping 95.2% smaller than Python 3.9

This minimal images contain only the essentials, significantly reducing the image size.

2. I minimized layers - every command in a Dockerfile (like RUN, COPY, etc.) generates a separate layer in the final image. Grouping similar commands together into one step makes sense, which decreases the total number of layers, leading to a smaller overall image size.

Instead of doing this:

RUN apk update
RUN apk add --no-cache git
RUN rm -rf /var/cache/apk/RUN apk update
RUN apk add --no-cache git
RUN rm -rf /var/cache/apk/*  *

Do this:

RUN apk update && apk add --no-cache git && rm -rf /var/cache/apk/*

3. Used .dockerignore File - Docker transfers all the files from your project directory into the image by default. To avoid including unneeded files, used a .dockerignore file to exclude them.

__pycache__
*.pyc
*.pyo
*.pyd
venv/

4. Multi-Stage Builds - Here all the magic happens !

Single Stage Vs Multi-Stage Builds Comparison:

Take an example of a Flask app built using the python:3.9-alpine image with a single-stage Dockerfile like:

# Use an official Python runtime as a parent image
FROM python:3.9-alpine

# Install necessary build dependencies
RUN apk add --no-cache build-base \
    && apk add --no-cache gfortran musl-dev lapack-dev

# Set the working directory
WORKDIR /app

# Copy the requirements file and install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code to the working directory
COPY . .

# Expose the port the app will run on
EXPOSE 5000

# Run the Flask app
CMD ["python", "app.py"]

The image built was of size: 588 MB

Redesigned Multi Stage Dockerfile looks like:

# Dockerfile.multi-stage

# Stage 1: Build
FROM python:3.9-alpine AS builder

# Install necessary build dependencies
RUN apk add --no-cache build-base \
    && apk add --no-cache gfortran musl-dev lapack-dev

# Set the working directory
WORKDIR /app

# Copy the requirements file and install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code to the working directory
COPY . .

# Uninstall unnecessary dependencies
RUN pip uninstall -y pandas && apk del build-base gfortran musl-dev lapack-dev

# Stage 2: Production
FROM python:3.9-alpine

# Set the working directory
WORKDIR /app

# Copy only the necessary files from the build stage
COPY --from=builder /app /app

# Expose the port the app will run on
EXPOSE 5000

# Run the Flask app
CMD ["python", "app.py"]

The new image size was: Only 47.7 MB

The application works exactly the same, but it spins up much faster in this version.

That's an whomping -91.89 %

Less the image size = Faster deployments + Quicker scaling + Lean infrastructure

Liked this article ? you can find more on techops examples


r/docker • • Dec 12 '20

Full Kubernetes Course for Beginners (~4 Hours, Free)

574 Upvotes

Hi there 👋

I created a complete Kubernetes course, which I think could be interesting for some (beginners) of you. If you're just getting started with Kubernetes, but maybe also good for refreshing some concepts.

.

COURSE OUTLINE

.

What is Kubernetes

  • What problems does Kubernetes solve?

  • What features do container orchestration tools offer?

.

Main K8s Components

  • Node & Pod

  • Service & Ingress

  • ConfigMap & Secret

  • Volumes

  • Deployment & StatefulSet

.

K8s Architecture

  • Worker Nodes

  • Master Nodes

  • Api Server

  • Scheduler

  • Controller Manager

  • etcd - the cluster brain

.

Minikube and kubectl - Local Setup

  • What is minikube?

  • What is kubectl?

  • install minikube and kubectl

  • create and start a minikube cluster

.

Main Kubectl Commands - K8s CLI

  • Get status of different components

  • create a pod/deployment

  • layers of abstraction

  • change the pod/deployment

  • debugging pods

  • delete pod/deployment

  • CRUD by applying configuration file

.

K8s YAML Configuration File

  • 3 parts of a Kubernetes config file (metadata, specification, status)

  • format of configuration file

  • blueprint for pods (template)

  • connecting services to deployments and pods (label & selector & port)

  • demo

.

Demo Project

  • Deploying MongoDB and Mongo Express

  • MongoDB Pod

  • Secret

  • MongoDB Internal Service

  • Deployment Service and Config Map

  • Mongo Express External Service

.

Organizing your components with K8s Namespaces

  • What is a Namespace?

  • 4 Default Namespaces

  • Create a Namespace

  • Why to use Namespaces? 4 Use Cases

  • Characteristics of Namespaces

  • Create Components in Namespaces

  • Change Active Namespace

.

K8s Ingress explained

  • What is Ingress? External Service vs. Ingress

  • Example YAML Config Files for External Service and Ingress

  • Internal Service Configuration for Ingress

  • How to configure Ingress in your cluster?

  • What is Ingress Controller?

  • Environment on which your cluster is running (Cloud provider or bare metal)

  • Demo: Configure Ingress in Minikube

  • Ingress Default Backend

  • Routing Use Cases

  • Configuring TLS Certificate

.

Helm - Package Manager

  • Package Manager and Helm Charts

  • Templating Engine

  • Use Cases for Helm

  • Helm Chart Structure

  • Values injection into template files

  • Release Management / Tiller (Helm Version 2!)

.

Persisting Data in K8s with Volumes

  • The need for persistent storage & storage requirements

  • Persistent Volume (PV)

  • Local vs Remote Volume Types

  • Who creates the PV and when?

  • Persistent Volume Claim (PVC)

  • Levels of volume abstractions

  • ConfigMap and Secret as volume types

  • Storage Class (SC)

.

Hope the content is useful for some of you 😊


r/docker • • Nov 14 '25

Docker banned - how common is this?

522 Upvotes

I was doing some client work recently. They're a bank, where most of their engineering is offshored one of the big offshore companies.

The offshore team had to access everything via virtual desktops, and one of the restrictions was no virtualisation within the virtual desktop - so tooling like Docker was banned.

I was really surprsied to see modern JVM development going on, without access to things like TestContainers, LocalStack, or Docker at all.

To compound matters, they had a single shared dev env, (for cost reasons), so the team were constantly breaking each others stuff.

How common is this? Also, curious what kinds of workarounds people are using?


r/docker • • Jun 30 '19

Introducing Lazydocker, a terminal GUI for docker!

448 Upvotes

Hey guys, I just released Lazydocker, a terminal GUI for docker that you can use to speed up your local development!

https://github.com/jesseduffield/lazydocker/blob/master/README.md

Let me know what you think!


r/docker • • Oct 01 '26

Windows can now run Linux containers inside WSL without Docker

353 Upvotes

Which is great, because if there was one unsolved problem in 2026, it was finding a way to run a Linux container on a developer's laptop.

Microsoft has now given us wslc. I read the architecture deep dive expecting to understand why. I now understand the architecture.


r/docker • • Oct 24 '20

Full Docker Course for Beginners (~3 Hours, Free)

323 Upvotes

Hi there 👋

I created a complete Docker course, which I think could be interesting for some (beginners) of you. If you're just getting started with Docker, but maybe also good for refreshing some concepts.

By the end, you will have a deep understanding of the concepts and a great overall big picture of how Docker is used in the whole software development process.

The course is a mix of animated theoretic explanations and hands-on demo’s to follow along, so you get your first hands-on experience with Docker and feel more confident using it in your projects.

.

Demo project: JS/NodeJS/MongoDB/MongoExpress

.

COURSE OUTLINE

What is Docker?

  • What is a container and what problems does it solve?

  • Container repository - where do containers live?

  • Development - before/after container

  • Deployment - before/after container

.

What is a Container?

  • What is a container technically? (layers of images)

  • Demo part (docker hub and run a docker container locally)

.

Docker vs Virtual Machine

.

Docker Installation

.

Main Docker Commands

  • docker pull

  • docker run

  • docker ps

  • docker run --options

  • docker stop

  • docker start

  • docker ports, docker port mapping

.

Debugging a Container

  • docker logs

  • docker exec -it

.

Demo Project Overview - Docker in Practice

.

Developing with Containers

  • Pre-Requisites

  • what we will do in this part

  • 1st part: The JavaScript App (HTML, JavaScript Frontend, Node.js Backend)

  • 2nd part: MongoDB and Mongo Express Set-Up with Docker

  • Docker Network concept and demo

  • 3rd part: Connect Node Server with MongoDB container

.

Docker Compose - Running multiple services

  • What is Docker Compose?

  • docker run commands VS docker compose

  • How to use it? - Create the Docker Compose File (Demo)

  • Docker Networking in Docker Compose

.

Dockerfile - Building our own Docker Image

  • What is a Dockerfile?

  • How the Dockerfile commands map to the image environment

  • Create the Dockerfile (Demo)

  • Build an image out of the Dockerfile

  • Start the Application to verify: 1) App starts successfully 2) App environment is configured correctly

  • do improvement - copy only relevant files

.

Private Docker Repository - Pushing our built Docker Image into a private Registry on AWS

  • Create a Private Repository on AWS ECR

  • Login to AWS (docker login)

  • Image Naming concept in Docker registries

  • docker tag to include the repository name in the image name

  • Push the Docker Image to the Private Repository

  • Make some changes to the Application, rebuild and push a new version to your AWS repository

.

Deploy our containerized application

.

Docker Volumes - Persist data in Docker

  • When do we need Docker Volumes?

  • What is Docker Volumes?

  • 3 Docker Volumes Types

  • Docker Volumes in docker-compose file

.

Volumes Demo - Configure persistence for our demo project

.

Appreciate any feedback and hope the content is valuable for some of you 😊


r/docker • • Apr 06 '25

Wrote the beginner Docker guide I needed when I was pretending to know what I was doing

293 Upvotes

Hey all — I put together a beginner-friendly guide to Docker that I really wish I had when I started using it.
For way too long, I was just copying commands, tweaking random YAML files, and praying it’d work — without really getting what containers, images, and Dockerfiles actually are.

So I wrote something that explains the core concepts clearly, avoids the buzzword soup, and sprinkles in memes + metaphors (because brain fog is real).

If you’ve ever copy-pasted a Dockerfile like it was an ancient spell and hoped for the best — this one’s for you.

No signups, no paywall, just a blog post I wrote with love (and a little self-roasting):
📎 https://open.substack.com/pub/marcosdedeu/p/docker-explained-finally-understand

Would love feedback — or better metaphors if you’ve got them. Cheers!


r/docker • • May 02 '18

Wicked Burn by XKCD

290 Upvotes

r/docker • • Mar 14 '21

Docker & Dockerfile Security Cheat Sheet

287 Upvotes

r/docker • • Nov 30 '25

PSA: My VPS got cryptojacked through Dockge

265 Upvotes

EDIT: Title is misleading - apologies. Dockge wasn't the vulnerability, my configuration was. The actual attack chain: exposed port 5001 directly to internet → weak admin password → attacker used Docker socket access to write a malicious systemd service to the host. This applies to any tool with socket access (Portainer, Yacht, etc). Docker socket = root access. Keep these behind a VPN or localhost-only with reverse proxy auth.

I wanted to share this because I nearly missed it and I'm sure others might make the same mistake as I did.

This morning I noticed my VPS was using almost all of its RAM right after a fresh reboot. Only 6 minutes of uptime and already at 7.5GB out of 7.8GB. The load average was through the roof too. I figured something was wrong so I ran ps aux sorted by memory usage to see what was eating everything.

That's when I saw it. A process called "docker-daemon" using 26% of my RAM and nearly 300% CPU. At first glance it looked legitimate, but the command line arguments told a different story. It was connecting to c3pool.org with a Monero wallet address and had flags like --randomx-1gb-pages. Someone was mining crypto on my server.

The clever part was how they hid it. They created a systemd service called docker-daemon.service, which sounds completely legitimate if you're running Docker. The service file was set to download XMRig from GitHub on every boot, rename it to "docker-daemon", and start mining. It would survive reboots and look innocent in the process list to anyone not paying close attention.

I traced back through my logs trying to figure out how they got in. SSH looked clean, all the successful logins were from my own IPs. Then I checked the Dockge container logs and found it. Two days before the miner appeared, someone from an IP I didn't recognize had successfully logged into Dockge as admin. Twice.

Here's where I messed up. I had spun up Dockge to try it out but never finished setting it up properly. I probably used a weak password during initial setup and then forgot about it. The container was exposed directly to the internet without any additional authentication layer in front of it. The attacker found it, logged in, and since Dockge has access to the Docker socket, they had everything they needed to write files to my host system.

The attack chain was simple. Find exposed Dockge instance, log in with weak or default credentials, use Docker socket access to create a privileged container or write directly to the host, drop a systemd service that persists across reboots. Clean and effective.

If you're running Dockge or Portainer or any Docker management UI, please make sure it's not directly exposed to the internet. Put it behind a VPN like Tailscale or Wireguard, or at minimum behind basic auth with strong credentials. These tools have access to your Docker socket which essentially means root access to your host if someone gets in.

I've since removed Dockge, firewalled all my Docker ports so they're only accessible via my reverse proxy, and cleaned up the malicious service. Lesson learned the hard way.

TL;DR: Left Dockge exposed with weak auth, attacker logged in and used Docker socket access to install a cryptominer that persisted via systemd. Always put Docker management tools behind a VPN.


r/docker • • Jan 17 '20

The only Kubernetes video you need to watch to understand more about K8s than most devops engineers

264 Upvotes

After watching this video Kubernetes Components explained you understand more about Kubernetes than most of the software developers out there 🤓

Kubernetes has tons of components, but most of the time you are only working with a handful of them. This video shows you step by step how each component helps you to deploy your application and what the role of each is.

Hope you like it! 😊


r/docker • • Nov 12 '20

A complete playlist for docker learning. Start learning docker for free.

257 Upvotes

Hello Friends, Check out my playlist for complete docker tutorial starting from setting up docker, docker basic commands, creating containers, deploying docker swarm, deploying multi node application in docker swarm, docker stack, docker secrets and more with integration with Jenkins, grafana, prometheus, ansible etc.. I hope this is useful for you.

https://www.youtube.com/playlist?list=PLVx1qovxj-amqyqHceAhkcsopzi4PFcKc


r/docker • • Jan 19 '19

Lets make "docker ps" human readable: docker-pretty-ps

253 Upvotes

Hey guys, long time reader first time poster.

I’ve been using docker for years, but cannot stand the “docker ps” output. I use a 13” monitor primarily and have bad eyesight. Shrinking my terminals font size to 8pt so I can fit everything on one line sucks... so I made docker-pretty-ps. Instead of going wide, lets go long. I also thought you might want to search through your containers, rather that dump them all to the screen, so i added that too.

The tool uses only built in python libraries, so it should install on any platform that's running Docker + Python.

docker-pretty-ps also has a handful of other CLI utilities to help you manage that docker ps data as well. This is my first published project so let me know your thoughts/ complaints and definitely bugs!

More info over at https://github.com/politeauthority/docker-pretty-ps

Or you can just install with

pip install docker-pretty-ps

Screenshot Regular Usage: https://imgur.com/zgcKx3H

Screenshot of SLIM mode: https://imgur.com/AR1N0R9

Project/ Source: https://github.com/politeauthority/docker-pretty-ps

TLDR: Let's make "docker ps " readable!

Edit: grammar

Edit2: Adding screenshots of --slim (s) mode


r/docker • • Mar 19 '24

The Ultimate Docker Compose Cheat Sheet

251 Upvotes

Hello Docker Community!
As a university lecturer, I know the importance of sharing knowledge. That’s why I’m excited to share a comprehensive Docker Compose Cheat Sheet that I’ve created. It is available as PDF and PNG. It’s completely free, with no email signup or any other requirements.
This Cheat Sheet is part of my detailed blog post about Docker Compose. Here is the link: https://devopscycle.com/blog/the-ultimate-docker-compose-cheat-sheet/ It walks through the essentials of managing multi container application with Docker Compose. You will also learn about accessing running containers and how to persist data. The post also includes a public GitHub repository. It comes with all the source code, available for anyone to use and learn from. It is an excellent entry point for an internal hackathon at your company or university.
If you like the blog post, the Docker Compose Cheat Sheet or the GitHub repository, I would appreciate it if you share it. Your feedback and experiences are always welcome. Let’s keep learning and growing together!
Cheers,
Mr_LA


r/docker • • 9d ago

The engineering team behind Bitnami has been laid off

250 Upvotes

r/docker • • Dec 21 '19

This is by far the best Docker tutorial I have found. I love it!

248 Upvotes

Mumshad is one such instructor who makes learning so easy. Good hands-on labs. This Docker course is fully free and highly recommended. Enjoy going through all his videos and it’s a great learning experience.


r/docker • • May 15 '18

Docker has made my school projects very easy

243 Upvotes

I'm a senior with one semester left for my degree. I started learning about Docker last year and boy did a massive lightbulb go off in my head when I found out about it.

My school, a crappy state school in the midwest that's teaching stuff 10-20 years out of date (but what CS department doesn't), has outdated redhat servers that we have to submit and compile all of our work on. Doesn't matter that I'm on Ubuntu 16.04 and using the latest stable releases of OpenJDK or G++ and all my projects work fine on my computer, only that it works on those ancient redhat machines. So I created a container that had those specific versions of OpenJDK and G++, I no longer had to login to my school's terrible server to do work.

I know this sounds crazy simple and silly but for a self-taught docker user this felt like a major victory. Thanks for reading!


r/docker • • Mar 17 '25

/r/Docker is reopen under new management

234 Upvotes

We just got the notification about an hour ago that they've installed new mods for the sub and I just got the sub back open for everybody to be able to post. We're already working behind the scenes to get things up and running with new automod filters and add some features that were missing before like the Wiki and such. I'm happy to be able to help out as a mod and keep this place clean. Thanks for everybody's efforts to get Reddit involved and the previous owner out. We'll do what we can to filter out the spam, but please report any posts we don't catch.


r/docker • • Jul 19 '25

Why Is Nobody Talking About Docker Swarm?

228 Upvotes

I just set up my first Docker Swarm cluster. I might sound like I'm from another planet, but something this brilliantly simple that just works - I can't believe I didn't try it sooner. Why does it get so little attention? What's your production experience with it?


r/docker • • Jun 04 '23

Don't Let Reddit Kill 3rd Party Apps!

Thumbnail self.save3rdpartyapps
224 Upvotes

r/docker • • Aug 31 '21

Docker to start charging for Docker Desktop in companies with over 250 people or $10M revenue

218 Upvotes

https://www.docker.com/blog/updating-product-subscriptions/

Specifically, small businesses (fewer than 250 employees AND less than $10 million in revenue) may continue to use Docker Desktop with Docker Personal for free. The use of Docker Desktop in large businesses, however, requires a Pro, Team, or Business paid subscription, starting at $5 per user per month.


r/docker • • Aug 12 '22

Dokter: the doctor for your Dockerfiles

205 Upvotes

I'm an incubation engineer at GitLab and I've been working on an analyzer for Dockerfiles in hopes to build faster, more secure, smaller images. I think it touches on some cool concepts and have a lot of ideas for further expansion such as automatically creating Dockerfiles to prevent them from becoming stale and order optimizing for caching.

Right now it's somewhat in between a linter and static analysis, looking for feedback to continue work on it. Love to hear your feedback.

https://gitlab.com/gitlab-org/incubation-engineering/ai-assist/dokter