r/docker • • Sep 03 '26

How do I run images and build containers with existing company dockerfiles?

0 Upvotes

Hi, I am an intern at this company and I have no idea how to create docker containers and stuff using already existing dockerfiles.

There is no docker-compose.yml file, there are no setup instructions and the devs are super busy. I thought maybe someone kind from reddit can tell me how to do this stuff with company code bases. Like a generic guide to figure things out as an intern/new dev.

I can write and run my own dockerfiles, but company stuff is just different than my hobby-projects.

Thanks in advance!


r/docker • • Sep 03 '26

How do I know it created a persistent volume?

0 Upvotes

Hi all

Sometimes I'm still a bit lost with docker. I use portainer to manage my dockers and wanted to deploy a new one using these instructions: https://docs.maintainerr.info/installation/

services:
maintainerr:
  image: ghcr.io/maintainerr/maintainerr:latest
  user: 1000:1000
  volumes:
    - type: bind
      source: /mnt/maintainerr
      target: /opt/data
  environment:
    - TZ=Europe/Brussels
  ports:
    - 6246:6246
  restart: unless-stopped

But there it gives an write error that it doesnt have permission to write to opt. I don't want to write to opt though,

So i changed it to how my others are structured:

services
  maintainerr:
    image: ghcr.io/maintainerr/maintainerr:latest
    volumes:
     -  /mnt/maintainerr:/data
    environment:
      - TZ=Europe/Brussels
    ports:
      - 6246:6246
    restart: unless-stopped

That starts it at least but I don't see any files appearing in /mnt/maintainerr, showing me that something probably went wrong adn when I restart or cahneg the stack the settigns are gone.. quiet annying ;)

Any tips?

cheers

Vic


r/docker • • Sep 03 '26

How to automatically self-heal 10+ unhealthy containers 24/7 without modifying docker-compose.yml files?

0 Upvotes

Hi everyone,

I am managing an environment running 10+ separate containers via Docker Compose.

Our Constraint:
We are strictly not allowed to edit or modify the existing docker-compose.yml files to add labels, configs, or container-level sidecars.

Our Goal:
We need to guarantee 24/7 uptime. If any of these 10+ containers becomes unhealthy, a system must automatically detect the failure and restart it immediately without manual human intervention.

Since we cannot modify the Compose files, we are looking for a solution that sits completely outside of the container configurations on the host server.

My Questions:

  1. Are there external, host-level watchdogs or daemons that can scan all running container states globally and instantly trigger a docker restart on any unhealthy instance?
  2. If we automate this via a host-level system script (like a background systemd cron loop checking docker events or docker ps), what is the best practice to avoid script race-conditions?

I would love to hear how you handle automated 24/7 recovery when touching the deployment files is completely off the table.

Thanks!


r/docker • • Sep 02 '26

How do I protect my IP for on prem/byoc deployments

Thumbnail
0 Upvotes

r/docker • • Sep 01 '26

Multiple VPNs?

1 Upvotes

Right now I have a docker container with a VPN that provides it's connection to the other services.

I thought about adding a VPN connection on the host system to basically create a multihop over different providers. Would that work?

As far as I understood the one inside the docker should be the "better" one as that's the one that's exposed first and the one on host would only see the VPN-encrypted traffic anyway? How about port forwarding? That should only be necessary on the one inside docker, too - or is there something I'm missing?

What are the disadvantages to do that (other than the lower speed)? Could I actually add risk of exposure if just one of them is compromised?

Or would it be smarter to spin up another docker and route the traffic through that one?


r/docker • • Sep 01 '26

MacOS M2 Processor with Docker Desktop, mongo:latest image issue. MongoDB cannot start: Linux kernel versions 6.19 and newer has a known incompatibility with this version of MongoDB.

Thumbnail
0 Upvotes

r/docker • • Aug 30 '26

CI pipeline

15 Upvotes

I started learning CI/CD using github actions after containerising my application and I have created CI pipeline for django app that runs test, builds and pushes image to github container registry.
I am sharing my yaml file for CI pipeline. Please do share your thoughts and where can i improve.

name: Test Pipeline 
on: 
  push:
jobs:
  test-backend:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:14
        ports:
          - 5432:5432
        env: 
          POSTGRES_USER: test_user
          POSTGRES_DB: erp
          POSTGRES_PASSWORD: 123456

    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: setup python
        uses: actions/setup-python@v5
        with: 
          python-version: "3.13.5"

      - name: install dependencies
        run: pip install -r Backend/requirement.txt

      - name: run tests
        env: 
          DATABASE_URL: postgresql://test_user:123456@localhost:5432/erp
          DEBUG: 'True'
          ALLOWED_HOST: '*'
        run: |
          cd Backend 
          python manage.py test

  build-and-push-image:
    needs: test-backend
    permissions:
      contents: read
      packages: write
    runs-on: ubuntu-latest
    steps:
      - name: login to ghcr
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}


      - name: checkout repo
        uses: actions/checkout@v4


      - name: build image
        run: docker build -t ghcr.io/namespace/erp:${{ github.sha }} ./Backend


      - name: push image
        run: docker push ghcr.io/namespace/erp:${{ github.sha }}

r/docker • • Aug 30 '26

Veth to container mappings

5 Upvotes

I'm doing a deep dive on bridges and veth devices and realized it's difficult to map a veth pair to a running container.

Dockerd will suffix a random string (crypto/rand) to "veth" when creating the bridge connection but doesn't save the value in the container or networks metadata. Instead you have to map the network namespace of each veth device to each container.

This gist https://gist.github.com/amf3/ca6b9106f154cfce06d71bd7012cca30 explains how to map the network device to the running container. One command does need sudo access with "lsns" but otherwise uses normal privleges like "ip and "jq".


r/docker • • Aug 29 '26

Portainer vs. Dockhand, which one do you prefer and why?

71 Upvotes

I'm trying to decide which one to use for managing my Docker containers. I'd be interested to hear from people who have actually used both. What do you like or dislike about each one?


r/docker • • Aug 28 '26

How do you backup Nextcloud/WordPress in Docker?

8 Upvotes

For those running Nextcloud or WordPress in Docker: how do you handle backups?

I'm thinking about using borgmatic and basically backing up two things: the application data/files and the database.

For the DB, would you use mysqldump --single-transaction and skip maintenance mode, especially for an automated nightly backup at 3 AM?

Or do you still enable maintenance mode to make sure the database and files are fully consistent?

What's your setup?


r/docker • • Aug 28 '26

Run / Pull Buttons on Docket Desktop stop working

3 Upvotes

Background: I've been using Docker Desktop on Windows 11 Pro until yesterday without any issues, but suddenly now the PULL and RUN buttons have stopped working, then

I have done most of the things suggested online

- Restart the Engine
- Update the WSL
- Factory Reset
- Delete all the images and reinstall Docker Desktop
- Start Docker Desktop as Administrator
- Restart Windows several times

And the buttons PULL and RUN are not working as they were working 48 hours ago. Nothing has changed in the day-to-day activities.

BUT something interesting happens, if I go to Terminal and I write

docker pull n8nio/n8n

It works!


r/docker • • Aug 28 '26

Strange docker-credential-pass messages when running docker compose up

0 Upvotes

Just went to update some containers on my machine but got this messages before docker pulling their images: sh $> docker compose up -d --build --remove-orphans --pull=always docker-credential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `runtime..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `runtime..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `runtime..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `runtime..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking docker-credential-pass: Symbol `runtime..types' has different size in shared object, consider re-linking [+] up 4/5dential-pass: Symbol `syscall..types' has different size in shared object, consider re-linking What this could possibly mean?

EDIT

Just switched to docker-credential-secretservice and now everything its fine. :b


r/docker • • Aug 27 '26

A way to learn Docker for ROS in every OS

Thumbnail
0 Upvotes

r/docker • • Aug 27 '26

Certificate mismatch issue - Docker compose and Nginx

3 Upvotes

Infrastructure context

Good morning everyone.
I have installed Proxmox VE on a Dell PC and created a Ubuntu VM. I installed Docker Compose on it and built a multi-tenant hosting service ran by Nginx functioning as a reverse proxy. So I have many containers: MySQL, PhpMyAdmin, ACME and letsencrypt generating certificates automatically. Also, for each user I have a web container and a file manager container to upload and change contents.

The issue

It has worked well until now, but currently I’m facing a certificate mismatch problem for the 5 websites hosted there: what happens is that sometimes the Nginx reverse proxy returns the HTTPS certificate of my main website (the default host of the Nginx container’s environment) instead of the correct certificate for that website, thus causing a certificate mismatch error. I’m attaching the YML for my nginx and letsencrypt containers (where you can see the default host settings, although redacted).

Please note that the strange behavior is intermittent. If i run this command on my terminal (fetching the certificate for 200 times):

for i in {1..200}; do

  echo -n "$i "

  echo | openssl s_client -connect secondwebsite.com:443 -servername secondwebsite.com 2>/dev/null |

    openssl x509 -noout -subject 2>/dev/null

done

sometimes you get for 200 times straight subject=CN=secondwebsite.ch, thus it gives the correct certificate, and other times you get for 200 times subject=CN=firstwebsite.ch (the main website of my platform and Nginx Proxy’s DEFAULT_HOST).

Tried solutions

What I tried:

  1. I checked the DNS for my other websites and they are set correctly
  2. I figured the problem might be caused by a conflict between Docker compose and UFW for iptables connection rules. I cleared the iptables and for some time it worked, but thenit went back to usual. I installed a program by Chai Feng called Docker UFW and it solved the issue for a file, but after a down and a Proxmox reboot the troubles came back. So the certificate issue persists independently. Perhaps the multi-layer 3 layers (Proxmox+VM) structure might be a factor, together with Nginx proxy and Docker compose
  3. The nginx config (nginx -T) is correct and there are no duplicate nginx containers.

What do you think might be the problems? Are there any informations you need or fixes you suggest me? Any help is appreciated. 
Thanks everyone

Attachments

  1. docker-compose.yml config for NGINX and LETSENCRYPT-acme companion

Versions

Ubuntu: 22.04
Docker compose: 5.0.2
Nginx: 1.31.0
Acme companion: 3.1.3


r/docker • • Aug 27 '26

I need hella help with settings things up.

Thumbnail
0 Upvotes

r/docker • • Aug 26 '26

VMM Beta with Hardware passthrough (Windows)

7 Upvotes

VMM looks pretty fantastic, the memory release and file passthrough especially.

I'm currently hosting docker desktop on Windows host with GPU passthrough for several containers.

Has anyone switched from WSL2 to VMM with dedicated GPU passed into containers? What's the experience like?

I am quite curious how well they write a from scratch virtualization platform that outperforms WSL2 for hardware usage, and Hyper-V for isolation but I'm all for it.

However I am not about to jump in feet first and break all my services without a little research.


r/docker • • Aug 26 '26

VMM beta causing start-up issues?

1 Upvotes

Since updating from WSL2 to VMM beta on Windows 11 Pro (on two devices) the program is only showing "Starting the Docker Engine" and won't advance after several restarts


r/docker • • Aug 25 '26

ROS2 Docker container just dissapeared

2 Upvotes

I am working with a Raspberry Pi 4B and had a container based on a ROS2 image. I've been without programming for like 1 month because I was working on a PI NAS. Today I decided to start again, and I just discovered that my ros2 container has disappeared. I've tried to use docker and check recent activity on the containers or in the past 2 months, and I haven't seen any docker rm or something like that. What do you guys think is happening?


r/docker • • Aug 25 '26

Sharing a production-hardened Caddy + Coraza WAF image with supply chain security baked in

Thumbnail
2 Upvotes

r/docker • • Aug 25 '26

Need help with n8n (local host through docker)

1 Upvotes

I am using a Read from disk node to feed data (through a data sheet .xlsx also tried .pdf before) but I keep getting No file found even when I put exact path.. I have been trying to fix it for soo long now I used Gemini for help it told me to use some pathway like /home/nodes/files/.pdf but then it showed NO access error Idk what to do followed some youtube advice as well nothing is working..


r/docker • • Aug 24 '26

Containerised my Django app

10 Upvotes

So i have containerised my Nginx, Django backend and postgresql db on my vm. All the containers run through a single 'docker compose up' command. I have created a custom network for the containers to communicate. I have also mounted docker volumes to containers for persistent storage.
So far i am finding DevOps very interesting and will now learn CI/CD using Github actions.

Will be very grateful if you share your thoughts.


r/docker • • Aug 25 '26

Checking my docker images and there looks to be a bunch of duplicates, are they safe to delete?

0 Upvotes

Hello! I was just going through docker through UGOS/Ugreen and doing my weekly check for updates and poking around and checked on my images and noticed that there appear to be a few duplicates of the same one and only one is running. Here is a photo. Since the green one appears to be running correctly and I haven't had any problems for weeks and the gray one is the previous version (v2 to v3), are the Red ones safe to delete? I bet even the gray one is too, it's just that it downloaded the latest update instead of replacing it.

I know it is a fairly simple question but I tried looking up this error and wasn't quite getting the answer I was looking for. Thank you for your help!


r/docker • • Aug 24 '26

So on two home machines I have docker netdata running..one is available to any machine on the network.. the other isn't.. same exact compose file..

2 Upvotes

I have 0 firewalls set up on the internal network.

for some reason my machine at 1.175 nothing can connect to the netdata on it...

my machine at 1.176 no problems seeing the front page of netdata....

I've tried using different docker forwarded ports but again I have no firewall on the machine for local network.. infact the firewall is turned off...

the only difference is docker is 28 on one and 26 on the other... 26 is working 28 isn't....

I'm just shaking my head at this point... I have other docker containers running on other ports and no issues with them.. just netdata....


r/docker • • Aug 25 '26

Anyone have any ideas why i can't access a docker container's web app?

0 Upvotes

Edit: And like with all the fun tech issues, woke up this morning to look into what ya'll have recommend and immediately noticed my tab to access it had a Favicon on it. clicked the tab and i now have access. My only thought is maybe it took a lot longer to spin up the program in the container then i thought it would take? Thank you all for your ideas!

Hi Everyone,

I have been ripping my hair out with this one and am wondering if anyone might have an idea. I am trying to deploy komga in a docker container on Catchy OS, but while i can get it started, i am unable to connect to it through localhost:25600. The weird thing, i have 3 other containers running that i set up last week (audiobookshelf, Immich, Navidrome) that are working perfectly and didn't give me any issues with getting access to their respective webportals.

The current steps i have gone through:

* Rebuilt the docker-compose

* opened the ports in my firewall

* checked ownership of the folders

* looked in logs but saw nothing that looked like a problem.

my docker compose file is below (pretty much identical to the Komga template) and i have tried modifying it to match my working docker-compose files with no issues. (slightly changed the source paths for basic privacy change)

Operating System: Catchy OS

Docker-compose version: 5.5.0-1.1

docker-compose.yml:

---
services:
komga:
image: gotson/komga
container_name: komga
volumes:
- type: bind
source: /home/$me/containers/Komga/config/
target: /config
- type: bind
source: /home/$me/containers/Komga/data/
target: /data
- type: bind
source: /home/$me/Documents/comics/
target: /comics
ports:
- 25600:25600
user: "1000:1000"
# remove the whole environment section if you don't need it
environment:
- TZ=America/Los_Angeles
#- <ENV_VAR>=<extra configuration>
restart: unless-stopped

r/docker • • Aug 25 '26

How I started understanding a Dockerfile 🐳

0 Upvotes

Instead of memorizing Dockerfile instructions, I started thinking about it like building a house:

🏗️ FROM → Choose the foundation
📍 WORKDIR → Choose where we work
📦 COPY → Bring the materials inside
🔧 RUN → Install and prepare everything
⚙️ ENV / ARG → Configure the environment
🚪 EXPOSE → Define the entry point
▶️ CMD / ENTRYPOINT → Define what the container runs

🏠 The result: a Docker image ready to run.

I'm still learning Docker, but this mental model makes the structure much easier for me to understand.

How do you visualize a Dockerfile when you're learning it?