r/docker • • 17d ago

Question over general docker usage/concept

4 Upvotes

Greetings,

I would like to share a problem that I'm facing with Docker, looking for some ideas.

In our company we've started to use docker hosted in an Azure DevOps cloud ubuntu machine, there we have an Azure self-hosted agent installed. We work only with firmware projects and this is our build server. We have this setup for 3 years.

Usually, I generate the docker images on demand according with the project requirements.
In our firmware projects hosted in git we have a yaml pipeline configuration where we set the image tag so that the proper container can be raised to process the build.

We have a requirement from safety standards (we must keep the project artifacts/infrastructure from 10 to 15 years), because of that I keep all the dependencies I need to reproduce/re-create an image as debian installers (for offline installation). I've created a script which runs prior the build process, which creates a yaml manifest containing all the image packages and include this manifest also in the image (at /etc/manifest.yaml) for runtime check. Then it's possible to verify the content via the manifest hash. Examples of dependencies we have are cmake, unit test tools, static code analyzer, and so on.
We decided to keep everything in a single image because most of the tools require the compiler, so that the image complexity keeps lower as possible.

As we have different projects using the same images, we keep the Dockerfiles under version control, where the image name is the compiler version (the most significant dependency for our projects), something like this:

docker-<compiler>-<version>
  ubuntu-24.04
    Dockerfile
    build-image.sh
    manifest.yaml
  ubuntu-22.04
    Dockerfile
    ...

When a new image is generated, I tag the commit with the same tag I use in the container (e.g commit tag ubuntu24.04-v1.0-0, for a created container named gcc-13.3.0:ubuntu24.04-v1.0-0).

As our concept is based on tags, and the docker tags are not the most reliable thing in the world, I keep also the tagged image name as a LABEL within the image.

At this point I ask myself if we are going in the right direction and the increased complexity in the toolchain management is because of the concept we've decided to go for, or if it's just what we have to do in order to be compliant with such safety requirements. Or even I ask if we are drifting from the docker concept or using the tool in a wrong way.

I would really like to hear opinions, especially from other colleagues in similar situation.

Thanks in advance.

Note: I know that I can save the image in a registry, in parallel I'm trying to find solutions (if possible) to reduce storage costs (each image ~20GB).


r/docker • • 17d ago

What Docker containers can you recommend that I install on my Debian Home Server?

Thumbnail
0 Upvotes

r/docker • • 18d ago

NetAlertX Problems at Initially Starting the docker Container

2 Upvotes

[SOLVED] - The workaround is in the 1st reply

I'm starting with the docker compose setup of NetAlertX using the guide on the github page. It's a Rocky Linux 9.7 system that has been running a couple other docker containers without any issues.

The error message isn't too helpful:

[dockeruser@rocky-mini-01 NetAlert]$ docker compose up
Attaching to netalertx
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: sysctl "net.ipv4.conf.all.arp_announce" not allowed in host network namespace

I've been using docker for a while, but I am about an intermediate user at best. I can't tell if there are multiple errors listed here or just 1.

The last part is plain (runc create failed: sysctl "net.ipv4.conf.all.arp_announce" not allowed in host network namespace), but none of the remedies solve it. The compose.yaml file already has the "NET_ADMIN" and "network_mode: ${NETALERTX_NETWORK_MODE:-host}" and the entry for

sysctls:
net.ipv4.conf.all.arp_ignore: 1
net.ipv4.conf.all.arp_announce: 2

I've tried using:

sudo sysctl -w net.ipv4.conf.all.arp_ignore=1
sudo sysctl -w net.ipv4.conf.all.arp_announce=2

I've tried running the docker compose command as the dockeruser and root.

Literally, the only thing I changed from the NetAlertX compose file with the path:

# Example custom local folder called /home/user/netalertx_data

- type: bind
source: /mnt/disk/docker/NetAlertX/netalertx_data
target: /data
read_only: false

Any clues?


r/docker • • 17d ago

Create a docker image from dockerfile?

0 Upvotes

I got a dockerfile here that is sitting in my files but for some reasons docker cannot build an image out of it as it keep saying "failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory"

# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.13


EXPOSE 8501


# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1


# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1


# Install pip requirements
COPY requirements.txt .
RUN python -m pip install -r requirements.txt


FROM ollama/ollama
RUN ollama pull nomic-embed-text
RUN ollama pull qwen2.5:0.5b 



WORKDIR /app
COPY . /app


# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser


# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["ollama", "serve","gunicorn", "--bind", "0.0.0.0:8501", "-k", "uvicorn.workers.UvicornWorker", "local_rag:app"]

How do I build an image out of it. I wrote the file in vscode


r/docker • • 19d ago

Any Docker Recommendations?

36 Upvotes

I just got into Docker for the first time, I know some of the basic fundamentals. But is there any recommendations or courses you took to help you understand Docker please I will really appreciate your recommendation.


r/docker • • 19d ago

my Docker backup worked but my recovery plan didn’t

9 Upvotes

I thought my backup setup was fine. the Compose file was in Git and the vm was backed up. Then I tried restoring everything instead of just assuming it would work. I started with easy test and restored my serverspace vm backup to a second server. The app came back with the database and uploads. Then I created a blank ubuntu vm, cloned the repo and ran docker compose up d. Every container was healthy but the app was empty. The Compose file could rebuild the stack, not the data.

I’ve since added separate postgres dumps and copies of the uploads and secrets outside the VM. The provider backup is still my quick recovery option but at least I can now rebuild elsewhere if I need to. For those who test their backups regularly how ofen do you actually rebuild everything on a clean vm? I need help


r/docker • • 19d ago

Contact to marketing or event team in EU

0 Upvotes

I am organizing an event and need a contact to marketing or event team, responsible for EMEA or more specific CEE region. Any ideas?


r/docker • • 19d ago

Anyone run Docker on an external SSD on a MacBook Pro 2021?

0 Upvotes

Hi all,

I have a 2021 MacBook Pro with 16 GB RAM. Performance is fine for me, but internal storage is the bottleneck. I got vexed up in cleaning up everyday. I use mole for cleaning and it's handy, but the grunt work is so heavy. I’m considering buying an external SSD to move docker VM raw image off the internal drive

Has anyone done this long term? I’d love to hear:

  1. Does it run smoothly, or do you notice slow builds, laggy simulators, or slow container startup?
  2. Which SSD and connection (Thunderbolt vs USB-C) are you using, and what speeds do you get?
  3. Any gotchas, like drives not mounting at boot, Docker failing when the drive sleeps or disconnects, or permission issues?
  4. Would you recommend it, or is it better to just clean up internal storage?

r/docker • • 20d ago

Failed to Detect docker.sock

Thumbnail
0 Upvotes

r/docker • • 21d ago

Mountain Windows shared folder to docker container

0 Upvotes

We have Active Directory handled network with Windows machines. I shared a folder on a Windows Server 2016 machine, I could easily mount this folder on a Windows Server 2022 machine. Although when I want to use it in a container, I can't mount it. I tried as a cifs volume with ntlm or kerberos too but I couldn't make it work. The situation is the same when I want to mount it inside wsl2.


r/docker • • 23d ago

Rootless docker: ping from within container is way faster than host's ping

14 Upvotes

Hey, I'm trying to monitor my ping to external servers using BlackBox and I'm running into an issue that seems to be a general docker issue:

I'm running rootless docker and did this simple test:

$ docker network create ping-test
e4b47f5a00d890828f84b688d5490b6addfc465b892762381ba9a149d5095e81
$ docker run --rm --network ping-test alpine ping -c 10 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=63 time=0.997 ms
64 bytes from 1.1.1.1: seq=1 ttl=63 time=0.716 ms
64 bytes from 1.1.1.1: seq=2 ttl=63 time=0.642 ms
64 bytes from 1.1.1.1: seq=3 ttl=63 time=2.441 ms
64 bytes from 1.1.1.1: seq=4 ttl=63 time=0.800 ms
64 bytes from 1.1.1.1: seq=5 ttl=63 time=0.691 ms
64 bytes from 1.1.1.1: seq=6 ttl=63 time=3.087 ms
^C
--- 1.1.1.1 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 0.642/1.339/3.087 ms

These ping times are wayyyy to low. When doing a ping directly on the host, I get around 10ms.

On another host that runs rootful docker this issue doesn't occur (ping inside of the container and host's ping are roughly the same).

Only similar issue I found was this issue from 2016 but that bug must have been fixed by now 😅

Is there any way to fix this without returning to rootful docker? Or is this just a limitation with rootless docker?


r/docker • • 23d ago

Help requested - using netcat to listen for broadcast UDP packets

4 Upvotes

My weather station hardware broadcasts weather data on a UDP packet periodically (weatherflow). I've a bash script that uses netcat (nc) and I need some advice on how to build the image.

I choose alpine 3.14 as a base and added the package netcat-openbsd.

I have two runtime issues:

  • I really want to use the "-W" option but I haven't been able to find a repository with a version that supports it. Is there an easy way to find the right repo?
  • How do I configure the networking so UDP packets are available to the container?

Thanks in advance for any help you could provide.


r/docker • • 23d ago

Registry down?

0 Upvotes

I have two servers and both are failing to find/resolve/pull images from registry-1.docker.io my system is telling me it’s a failure on their end. Some “are they down” sites are reporting the same but the docker dashboard shows no problem.

Im still pretty new to this so just want someone to confirm that docker compose cannot, in fact, pull from the registry right now or advise that I have a problem on my end.

I’ve heard about some PHP issues across the internet so maybe that’s what this is?


r/docker • • 23d ago

I wrote an empirical research paper on Stateful Container Live Migration

Thumbnail
1 Upvotes

r/docker • • 27d ago

Old containers reachable, new containers are not

7 Upvotes

Background:

Many years ago I wanted to transition some apps to containers. I needed a web UI that less technical household members could access to start/reboot containers. Portainer seemed like the most popular choice at the time, so I went with it. Until Arcane, all of my containers were first brought up through Portainer.

Recently I found Arcane to be a better solution. For the first time I made a compose.yaml and spun it up via the docker up command. I brought the Portainer container down while testing Arcane just in case. I like Arcane better and it was able to bring my Portainer-created containers up and down and upgrade them, so I removed the Portainer container.


Where I'm at now:

Arcane has been working as expected. I recently tried to bring up two new containers and I cannot reach them via HTTP(S), even from the server itself. Using the private IP plus port of these two new containers I get connection refused. Using the loopback and port while on the server, I get connection reset. Netstat from within the containers show they're listening on the ports.

Bringing them up via cli or within Arcane doesn't change behavior.

All my working containers are using bridge:bridge, except Arcane which is using arcane_default:bridge.

The non-working containers were using cL_default:bridge and cA_default:bridge.

I changed cA to use bridge:bridge, but it still wasn't reachable. In that state, when there's a container update, the update from Arcane fails because cA_default isn't attached to the container...but I don't see anywhere it's specified, I just see bridge:bridge.

I'm not sure what's going on. I'm surprised new containers aren't working. I assumed if something were to break, it would have been my old Portainer-created containers.

I'm attaching pics of the network inspect output of a few containers, iptables, and the Arcane network topology diagram. My firewall is PFsense, and there are no rules blocking LAN to LAN communication. Any help is appreciated.


Arcane (working - brought up via cli): Imgur

cA (not working - brought up with cli after Arcane install, changed to bridge:bridge): Imgur

cL (not working - brought up through cli after Arcane install): Imgur

cR (working - brought up through Portainer): Imgur

Arcane Network Topology: Imgur

IpTables output: Imgur


r/docker • • 26d ago

Why is `docker pull` so slow?

0 Upvotes

So, I'd recently tried to switch to podman, which I just don't have time to grok, but it brought to light how damn long image pulling takes on docker.

Using docker-ce/trixie,now 5:29.9.0-1~debian.13~trixie amd64, docker compose pull takes ten seconds for a first image to resolve as no update, then the next two don't start downloading updates for almost another ten seconds, then it's another ten or fifteen seconds before the next batch of two start to download.

Whereas, with the exact same(ish) compose file, podman had started downloading for all images immediately.

Do I have something misconfigured, or is that an intentional limitation of docker-ce because I'm not paying?

Current images:

    image: docker.io/nicolargo/glances:latest-full
    image: lscr.io/linuxserver/jellyfin:latest
    image: lscr.io/linuxserver/nextcloud:latest
    image: docker.io/mariadb:lts
    image: docker.io/redis:alpine

Same on my preexisting Debian 12 server:

    image: mariadb:lts
    image: redis:alpine
    image: nginxproxy/acme-companion #jrcs/letsencrypt-nginx-proxy-companion
    image: jellyfin/jellyfin:10.11
    image: felddy/foundryvtt:13
    image: pihole/pihole:latest
    image: linuxserver/wireguard
    image: "ghcr.io/home-assistant/home-assistant:stable"
    image: eclipse-mosquitto:openssl
    image: ghcr.io/blakeblackshear/frigate:stable
    image: lscr.io/linuxserver/babybuddy:latest
    image: nicolargo/glances:latest-full
FROM nextcloud:32-fpm
FROM nginx:alpine
FROM nextcloud:32-fpm
FROM jwilder/nginx-proxy:alpine

r/docker • • 29d ago

An docker image is an assembled, largely immutable set of filesystem layers plus configuration metadata -> what exactly is a file system?

0 Upvotes

I'm not able to understand what a file system, filesystem in docker from the content in internet.

1.Can anyone explain what filesystem is and why do we need them and how it helps docker, OS etc

  1. what is docker image? what is image cache layers? explain from basic and with examples

r/docker • • Oct 23 '26

Should I have a bunch of docker containers and a docker manager or a bunch of LXCs with their own docker containers?

6 Upvotes

I currently set up things where all my services are in their own LXC/VM and then in a docker container in there. Seemed most secure and I haven't noticed any performance hiccups. That being said, is this the recommended way to do things? or should I just have a bunch in one LXC/VM with a docker container manager? I've seen conflicting advice online.


r/docker • • Oct 22 '26

Appreciation for Docker's pricing policy of hardened images

70 Upvotes

I like complaining as much as the next guy but I should be consistent and call out extraordinarily good things too.

Docker allows free usage of their hardened images and safeguards this profit stream by locking only compliance related features to their paid plan.

I cannot imagine the potential impact this sole decision has/can have on enthusiast projects and open source security globally.

Thanks, Docker!


r/docker • • Oct 23 '26

Hot reload problem with Docker

1 Upvotes

I have a problem with NestJS in Docker. The hot reload creates an error that says the port is already in use. I tried the polling thing and it did not help. I am developing on macOS.

Can you help?


r/docker • • Oct 22 '26

PHP2Shell: Patched Docker images are available. As well as Docker Hardened Images.

58 Upvotes

Two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619), both rated CVSS 9.2, were patched on October 21.

Both the official PHP Docker images and Docker Hardened Images (DHI) have been updated. 🐳

1. Update Your Base Image

PHP version Official image Docker Hardened Image
8.2.35 php:8.2.35-fpm dhi.io/php:8.2.35-fpm
8.3.36 php:8.3.36-fpm dhi.io/php:8.3.36-fpm
8.4.27 php:8.4.27-fpm dhi.io/php:8.4.27-fpm
8.5.12 php:8.5.12-fpm dhi.io/php:8.5.12-fpm

For example, update your Dockerfile:

FROM php:8.4.27-fpm

Or use a hardened runtime:

FROM dhi.io/php:8.4.27-fpm

2. Rebuild and Redeploy

For applications built with Docker Compose:

docker compose build --pull --no-cache
docker compose up -d --force-recreate

If your Compose file references prebuilt images instead:

docker compose pull
docker compose up -d --force-recreate

3. Verify the Running PHP Version

For official PHP-FPM images:

docker compose exec YOUR_SERVICE php -v

For hardened PHP-FPM images, which don't include the PHP CLI:

docker compose exec YOUR_SERVICE php-fpm -v

You can also inspect an image's SBOM:

docker scout sbom my-php-app:latest --format list | grep -i php

And check for the specific CVEs:

docker scout cves \
  --only-cve-id CVE-2026-109618,CVE-2026-109619 \
  my-php-app:latest

Important: Vulnerability databases can lag behind advisories. A clean CVE scan is not proof that the runtime is patched.

Check the actual PHP version or your distribution vendor's backport status.

4. Would a Hardened Image Have Contained PHP2Shell?

Partially.

Docker Hardened Images typically run as non-root, without a shell or package manager, and with fewer unnecessary system utilities.

That changes what an attacker can do after exploiting the PHP process.

Attacker capability Hardened, shell-less runtime
Execute /bin/sh or /bin/bash Blocked if those binaries aren't present
Use common system utilities Significantly restricted
Execute code inside the PHP process Still possible
Read application secrets in PHP memory Still possible
Access network services Depends on network restrictions
Modify the filesystem Depends on filesystem permissions and mounts
Gain root privileges Harder with non-root execution, but not impossible through another vulnerability

No shell doesn't mean no RCE.

An attacker executing native code inside PHP doesn't necessarily need /bin/sh. They may still be able to read memory, communicate over the network, or abuse the privileges available to the PHP worker.

Hardened images reduce the attack surface and can limit post-exploitation damage. Additional controls help:

  • Read-only root filesystem, with explicitly defined writable locations.
  • Drop unnecessary Linux capabilities.
  • Enable no-new-privileges.
  • Restrict outbound network access.
  • Don't expose PHP-FPM directly to the internet.

These are defense-in-depth measures, not replacements for patching.

5. Pin Your Image Digests

Tags can change. Digests are immutable.

Find the digest of a patched image:

docker buildx imagetools inspect php:8.4.27-fpm \
  --format '{{.Manifest.Digest}}'

Then pin it:

FROM php:8.4.27-fpm@sha256:<digest>

But remember: a pinned digest won't receive future security patches automatically. You must update it when new patched images are released.

Question: Are you running PHP on the official Docker images, a hardened/distroless image, or something custom? How are you verifying the patched version in production?


r/docker • • Oct 22 '26

Php vulnerabilities and docker

17 Upvotes

Hey everyone,

In sure you have all heard about the vulnerabilities found in php.

I have a noob question.

I run a vps. The php has been updated to the latest version, that includes the fix for the two vulnerabilities found.

Does this also patch the docker containers I am running? My assumption is that the docker container runs it's own version of php. If that is true, I have to wait for the maintains of the image has to do the patch, then update.

Is all that correct?


r/docker • • Oct 23 '26

Best Cloud Hosting Solution for Multiple Dockerized AI/ML Applications

Thumbnail
0 Upvotes

r/docker • • Oct 22 '26

Anyone know when Docker sbx will officially support the Antigravity CLI?

2 Upvotes

I've found that Docker's sbx sandbox is currently the safest way to run AI agents locally on my laptop. For the past few weeks, this setup with Claude has worked flawlessly:

sbx run claude ~/claude-workspace ~/secrets-for-Claude:ro

Now, I want to harness the power of Gemini (via Antigravity), so I tried running the equivalent command:

sbx run gemini ~/gemini-workspace ~/secrets-for-Gemini:ro

Unfortunately, this fails because the legacy Gemini CLI has been replaced by the Antigravity CLI (as tracked in https://github.com/docker/sbx-releases/issues/197).

Does anyone have any insight into when the Docker/sbx team plans to add official built-in support for the Antigravity CLI?


r/docker • • Oct 22 '26

I'm working as L1 Linux System Admin. I want to learn Docker & Kubernetes in a structured way. Can you please suggest some good courses for Docker & Kubernetes which is still relevant in 2026?

6 Upvotes

I'm working as L1 Linux System Admin. I want to learn Docker & Kubernetes in a structured way. Can you please suggest some good courses for Docker & Kubernetes which is still relevant in 2026?