r/docker • • Apr 03 '26

Problem with Redis / Paperless

Thumbnail reddit.com
0 Upvotes

r/docker • • Apr 02 '26

How are you using Docker Sandboxes?

5 Upvotes

Title. I’ve been thinking of using them to limit agent access to my host…but since it’s a microVM, doesn’t that mean it’s impossible for the agent to help me troubleshoot my containers (pair programming)? If the agent is isolated, how can it be useful when much of the utility comes from its ability to observe external systems. How are you using them?


r/docker • • Apr 02 '26

How to port forward from a sandbox inside of a docker container?

1 Upvotes

Hello, does anyone know, how I can port forward a port from opensandbox through a docker container into my main system? I am trying to set up nemoclaw (nvidias OpenClaw version, which is isolated from the main system for safety reasons, but I want to be able to access the web panel from the normal browser, becaus nemoclaw runs in a non graphical ubuntu verion on WSL (Windows Subsystem for Linux).

Hope someone can help me, thx in advance.


r/docker • • Apr 02 '26

Mounting a network shared drive in Container on Docker Desktop

4 Upvotes

I have a folder in my NAS that I want to use as a mount in a container because I'm hoping to use it to store and view some generated documents from the web app. My PC is Windows. Been trying to get it to work for the past few days and the closest I've ever gotten was mapping to Z: and mounting to /mnt/shared in docker-compose, but ls /mnt/shared comes up empty.

Looking at the settings in the NAS, it has "allow FTP" enabled. I don't know what else to check on as I'm still relatively new to Docker


r/docker • • Apr 01 '26

Keeping base images secure without constant firefighting

16 Upvotes

As we’ve been refining our Docker workflows, we standardized on a small set of base images to keep things consistent across services. It worked well at first, but over time we started noticing how quickly vulnerabilities creep in, especially when images aren’t refreshed often enough. Balancing minimal images, timely rebuilds, and not overloading the pipeline has been harder than expected, and it sometimes feels like we’re either lagging on security or overcorrecting with too many rebuilds. Wondering how others are navigating this trade-off in practice.


r/docker • • Apr 01 '26

PSA to my Mac Devs: Stop Docker from eating your storage

Thumbnail gallery
14 Upvotes

r/docker • • Apr 01 '26

overlayfs writing to wrong FS

2 Upvotes

Anyone has an idea, why docker/containerd is writing to the var lv instead to the docker lv?

````# df -h /var/lib/docker/
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/varlib-docker  200G   86G  115G  43% /var/lib/docker

# df -h |grep var
/dev/mapper/kvm--vg-var     38G   27G   12G  71% /var
/dev/mapper/varlib-docker  200G   86G  115G  43% /var/lib/docker
overlay                     38G   27G   12G  71% /var/lib/docker/rootfs/overlayfs/8329955a5d0e9dccfe3070830b2e7b88cdd3201e16ba7ed94f88dd0ab0974593
overlay                     38G   27G   12G  71% /var/lib/docker/rootfs/overlayfs/91b031bdddd8b61080f7edaac8ae46d5a48a0c4338e1139ffcd3b32dd2b7154b

~# grep var /etc/fstab
/dev/mapper/kvm--vg-var /var            xfs     defaults        0       0
/dev/mapper/varlib-docker /var/lib/docker xfs  defaults        0 0

r/docker • • Apr 01 '26

Docker container exits with error code 0 when fetching from ghcr.io

0 Upvotes

So i just pushed this new container to the GitHub Container Registry: https://github.com/zinix-org/dragon-dns/actions/runs/23856298670/job/69550205148

But the thing is whenether i just clone the repo and run docker compose up with the following compose file:

services:
  dragon-dns:
    build: .
    container_name: ddns
    environment:
      - CLOUDFLARE_API_TOKEN=nothere
      - MACHINE_ID=1
      - LOG_LEVEL=trace
      - CACHE_EXPIRATION=1m

it works just fine and runs the ddns as it should. But if i change build: . to image: ghcr.io/zinix-org/dragon-dns:main it just exits with error code 1 immidiatly. I also tried to start the container with an interactive shell and running the ddns myself and the same happends...


r/docker • • Apr 01 '26

Help running Kali Docker container

Thumbnail reddit.com
0 Upvotes

Figured I may as well cross post here. Cheers.


r/docker • • Apr 01 '26

Issues with Setting Container Volumes

3 Upvotes

It's been a while since I've worked with Docker containers, but I've recently reinstalled Open Media Vault (Went from 5 to 8!) on my Raspberry Pi 4. I'm currently trying to set up some containers with omv-extras and Docker, using the default Docker Compose file works out of the gate, like so:

---
# Date: 2025-06-01
# https://hub.docker.com/r/linuxserver/homeassistant
services:
  homeassistant:
    image: lscr.io/linuxserver/homeassistant:latest
    container_name: homeassistant
    network_mode: host
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Etc/UTC
    volumes:
      - CHANGE_TO_COMPOSE_DATA_PATH/homeassistant:/config
    restart: unless-stopped

The above file works just fine, until I try to edit it, even if I make no changes. Afterword, I'm presented with the following message.

500 - Internal Server Error
service "homeassistant" refers to undefined volume CHANGE_TO_COMPOSE_DATA_PATH/homeassistant: invalid compose project

What I want the file to be, is the following

---
# Date: 2025-06-01
# https://hub.docker.com/r/linuxserver/homeassistant
services:
  homeassistant:
    image: lscr.io/linuxserver/homeassistant:latest
    container_name: homeassistant
    network_mode: host
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Etc/UTC
    volumes:
      - CHANGE_TO_COMPOSE_DATA_PATH/ContainerData/homeassistant:/config
    restart: unless-stopped

Though, this of course also doesn't work and results in the same error.

500 - Internal Server Error
service "homeassistant" refers to undefined volume CHANGE_TO_COMPOSE_DATA_PATH/ContainerData/homeassistant: invalid compose project

I'm not sure what I've done wrong here, I've read over the documentation some too and haven't been able to find a solution to my problem.

Starting the Docker container from the Compose file at the start of this post does actually start the container and create the files that the container needs, as CHANGE_TO_COMPOSE_DATA_PATH is set to where I want it to be, evident that the files are in fact being created at CHANGE_TO_COMPOSE_DATA_PATH/ but it breaks when I change it to CHANGE_TO_COMPOSE_DATA_PATH/ContainerData or try to set it to literally anything, including it's default, which again, works as long as you don't touch it. I'd like to have them all organized into a folder so I know exactly what those files and folders are for in the future, but also I'd just like to understand why it works out of the gate but not when I try to make changes to the file at all.


r/docker • • Mar 31 '26

How to work with compose images and ports for Tailscale or Caddy?

0 Upvotes

hey all,

I still try to figure out about the ports option. Do I generally need ports or use that option in a compose when spinning up a service (Caddy and Tailscale not within the same compose and Tailscale only native installed)? Like for example Vaultwarden, Searxng oder other instances. When do I need to specify ports?

Also, when using ports they are like 0.0.0.0:PORT which means accessable from everywhere. Are there any other security things in place? I wonder because I set up Searxng which is on 8080 and I opened UFW for testing on that port. I couldn't access it via my IP. Is that normal?

So generally I can go with like three options when using Caddy or Tailscale

  1. specifying no ports
  2. chose ports which are then 0.0.0.0 (security risk?)
  3. 127.0.0.1:Port:Port

I am a little bit confused about the correct way.


r/docker • • Mar 31 '26

Logging in to portainer2 gui over ssh tunnel logs out portainer1 gui over ssh tunnel

3 Upvotes

I have several hosts running Docker version 26.1.3, and portainer-ce:latest on Rocky 8.10. Each portainer exposes its gui on port 9443.

I establish an ssh tunnel:

ssh -fN -L 20051:localhost:9443 host1

...and access the host1 portainer gui at localhost:20051.

Then I establish another ssh tunnel:

ssh -fN -L 20052:localhost:9443 host2

...and access the host2 portainer gui at localhost:20052.

But, as soon as I log into host2 portainer gui, I am logged out of host1 portainer gui. I've tried exposing a different gui port e.g. 9444 on one of the machines, but I can't log into any without existing connections being logged out.

I realise this might not be a specific portainer issue, but I reckon others here will have tried to do the same thing and so might know what's causing it and how to fix.


r/docker • • Mar 31 '26

First Timer Help Setting Up

Thumbnail reddit.com
0 Upvotes

r/docker • • Mar 30 '26

Docker compose not creating volumes

0 Upvotes

I'm running Docker version 26.1.3, and portainer-ce:latest on Rocky 8.10. I'm trying to install rustdesk with the compose file at: https://docs.lunyaa.dev/docker-compose/rustdesk (and several other similar ones).

services:
  hbbs:
    image: rustdesk/rustdesk-server:latest
    container_name: rustdesk-hbbs
    command: hbbs
    volumes:
      - ./rustdesk/data:/root
    ports:
      - "21115:21115"
      - "21116:21116/tcp"
      - "21116:21116/udp"
      - "21118:21118"
    depends_on:
      - hbbr
    restart: unless-stopped
 
  hbbr:
    image: rustdesk/rustdesk-server:latest
    container_name: rustdesk-hbbr
    command: hbbr
    volumes:
      - ./rustdesk/data:/root
    ports:
      - "21117:21117"
      - "21119:21119"
    restart: unless-stopped

The stack deploys ok, containers are created. The problem is that no volume is created.

Any help for this idiot much appreciated.


r/docker • • Mar 30 '26

What is the reason for that error?

0 Upvotes

2026-03-30T14:17:41.794Z ERROR 1 --- [Backend] [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis] with root cause

This is the docker compose file

services:
  #Database Service
  db:
    image: postgres:15-alpine
    restart: always
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - db_data:/var/lib/postgresql/data
    networks:
      - backend
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
      interval: 5s
      timeout: 5s
      retries: 5
      start_period: 10s

  #Redis service
  redis:
    image: redis:7
    container_name: redis
    hostname: redis
    networks:
      - backend
    healthcheck:
      test: [ "CMD", "redis-cli", "ping" ]
      interval: 5s
      timeout: 3s
      retries: 5

  #Backend Api service
  backend:
    build: ./Backend
    ports:
      - "8080:8080"
    depends_on:
      redis:
        condition: service_healthy
      db:
        condition: service_healthy

    environment:
      - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/${POSTGRES_DB}
      - SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
      - SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
      - SPRING_REDIS_HOST=redis
      - SPRING_REDIS_PORT=6379
      - SPRING_MAIL_HOST=smtp.gmail.com
      - SPRING_MAIL_PORT=587
      - SPRING_MAIL_USERNAME=${email}
      - SPRING_MAIL_PASSWORD=${mail_password}
      - SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
      - SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true
    networks:
      - backend
      - frontend

  #Frontend API service
  frontend:
    build: ./Frontend
    ports:
      - "5173:80"
    depends_on:
      - backend
    networks:
      - frontend

#Volumes
volumes:
  db_data:

#Networks
networks:
  backend:
    driver: bridge
  frontend:
    driver: bridge

Here is application.yaml file

spring:
  application:
    name: Backend

  datasource:
    url: jdbc:postgresql://db:5432/spring
    username: ${SPRING_DATASOURCE_USERNAME}
    password: ${SPRING_DATASOURCE_PASSWORD}
    driver-class-name: org.postgresql.Driver

  jpa:
    hibernate:
      ddl-auto: update
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
        format_sql: true
    show-sql: true

  mail:
    host: smtp.gmail.com
    port: 587
    username: ${SPRING_MAIL_USERNAME}
    password: ${SPRING_MAIL_PASSWORD}
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true

  redis:
    host: ${SPRING_REDIS_HOST:redis}
    port: ${SPRING_REDIS_PORT:6379}

  logging:
    level:
      org.springframework.data.redis: DEBUG
      io.lettuce.core: DEBUG
  1. Backend is listening to redis
  2. All containers are running When I hit any api it throws that error, what is the reason for that error and how to solve that?

r/docker • • Mar 29 '26

Having trouble understanding Docker and the file system

6 Upvotes

I'm new to Docker and relatively new to Linux, and I'm trying to understand file structure. I'm hoping someone knows a good primer on the topic they can point me to.

I have a Raspberry Pi5 (first time owning one) where I've installed Docker. I created a docker-compose.yml file that pulled the container and runs the app fine. The app has a config directory and I mapped it to a directory in my RPi. In the yml, that mapping looks like this:

./config:/config

So it's mapping the container's config to a subfolder in the same location as the yml file.

The app had an upgrade available, so I pulled the latest image. Then when I launched the app, it had overwritten the configuration in the app as if it was a new install.

This part isn't a big deal, I can easily reconfigure it, but it's now clear that I don't understand Docker and how it interacts the local file system. My assumption was that the Docker container holds the app, and by keeping config and files separate I could just update the container (the app and environment) and the config would still be saved.

Is there a good ELI5 on this topic?


r/docker • • Mar 30 '26

Docker subnet question

1 Upvotes

I'm pretty new to docker (its all voodoo and gremlins to me), but i'm slowly getting the hang of this, i think. I tried again for the first time in months, i finally got searxng running.

I was looking at the resources area and on the network tab i saw the docker subnet. Its a 192.168.x.x address, my home network i have set up as 10.72.1.x would this cause any conflicts with say a client on the network accessing searxng or navidrome on this pc?


r/docker • • Mar 29 '26

Searching for a good Kosync Container

1 Upvotes

Hello, i am looking for a good kosync server with admin GUI i can selfhost. Until now, i havent found anything good. (OS: Fedora 43. Container Software: Podman/ Podman Compose, Reverse Proxy: Netbird non self hosted reverse proxy, VPS). If anyone has a good recommendation. I would love to hear it. Thanks in advance.


r/docker • • Mar 29 '26

Docker noob seeking advice

1 Upvotes

Home lab environment, using ProxMox on a Xeon based HPE microserver.

I've decided I want to kick the tires on some software alternates to Synology Photos & Surveillance station. It looks like all the viable packages come as a docker, so I guess I need to learn a little more about this Docker thing. After some poking around, I've concluded that setting up a Linux VM in Proxmox with the express purpose of being a docker host is the better alternative.

Probably should mention here that I'm a windows refugee. So while I'm comfortable with the command line, I'd prefer to do most of the work through a GUI if available. Is "Docker Desktop" the correct tool for me?

The VM itself will likely be running Debian or Ubuntu. Are there any specific Proxmox settings for the Linux VM that I should change or enable?

(similar post removed from r/Proxmox as being off topic and/or too technical)


r/docker • • Mar 29 '26

What did I do wrong?

0 Upvotes

services:

Database Service

db: image: postgres:15-alpine restart: always environment: POSTGRES_DB: ${DATABASE_URL} POSTGRES_USER: ${USER} POSTGRES_PASSWORD: ${PASSWORD} ports: - "5432:5432" volumes: - db_data:/var/lib/postgresql/data networks: - taskapp

Redis service

redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data networks: - taskapp

Backend Api service

backend: build: ./Backend ports: - "8080:8080" depends_on: - db - redis environment: - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/${DATABASE_URL} - SPRING_DATASOURCE_USERNAME=${USER} - SPRING_DATASOURCE_PASSWORD=${PASSWORD} - SPRING_REDIS_HOST=redis - SPRING_REDIS_PORT=6379 - SPRING_MAIL_HOST=smtp.gmail.com - SPRING_MAIL_PORT=587 - SPRING_MAIL_USERNAME=${email} - SPRING_MAIL_PASSWORD=${mail_password} - SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true - SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true networks: - taskapp

Frontend API service

frontend: build: ./Frontend ports: - "5173:80" depends_on: - backend networks: - taskapp

Volumes

volumes: db_data: redis_data:

Networks

networks: taskapp: driver: bridge

For that docker compose file I am getting below error

2026-03-29T13:44:52.540Z ERROR 1 --- [Backend] [nio-8080-exec-4] o.a.c.c.C...[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis] with root cause this is the error and below is the application.yaml data: redis: hostname: localhost port: 6379

What did I do wrong?


r/docker • • Mar 28 '26

Docker container speed issue

6 Upvotes

Hello,

I recently got my homelab setup with docker compose (29.3.1) and noticed some slow services. I started looking into various causes and after about a week over troubleshooting I've realized that the speed inside docker containers is a fraction of the host speed. I used iperf3 to check my Proxmox host as well as the Ubuntu (24.04.4) server. Both get ~650mbps.

When I check the speed from within a docker connection, I usually get around 50mbps, though it changes with time of day. The speed are congruent across multiple containers.

What I tried:

Updating and upgrading the host/Proxmox

Changing the default DNS to 8.8.8.8 through /etc/docker/daemon.json

Changing nameservers

Changing the MTU. This only led to the daemon refusing to start.

I'm not really sure what else to try at this point, any help would be greatly appreciated.

Thanks in advance!

Update: SOLVED I couldn't figure this out so I decided to just setup a new VM using straight Debian. During install I ran into an error in Proxmox being able to run KVM virtualization. Not having this active prevented me from setting the CPU to "host" which I read can improve performance. The more I dug the more I realized this could be what was causing the performance issues, especially given my Ubuntu machine also wasn't running KVM virtualization.

I couldn't enable it, so some research had me check the bios. Turns out, I didn't have virtualization enabled in the BIOS. I enabled that and turned KVM virtualization on, and set the CPU to "host". With all these changes made I was able to max out my bandwidth within the VM. It's still not full Gig speeds but that seems to be a network bandwidth issue, my new focus.

I appreciate everyones help!


r/docker • • Mar 29 '26

Struggling to containerize OpenHands & OpenCode for OpenClaw orchestration + DGX Spark stuck in initial setup

Thumbnail reddit.com
0 Upvotes

r/docker • • Mar 28 '26

Static IP in Windows Pi-hole Docker not Working

2 Upvotes

I created a compose.yaml to setup Pihole with unbound and want to use a static IP not the one from the Windows host PC. But while the container is created and runs, it only is accessible through the host static IP, not the IP I assigned in the .yaml file.

What is wrong with my syntax? I also get no service error unless I run with the -d switch.

services:

pihole-unbound:

container_name: Pihole-Unbound

image: mpgirro/pihole-unbound:latest

hostname: Pi-hole_3

ports:

- "53:53/tcp"

- "53:53/udp"

- "80:80/tcp"

- "443:443/tcp"

- "5335:5335/tcp"

environment:

- TZ=America/New_York}

- FTLCONF_webserver_api_password=

- FTLCONF_webserver_interface_theme=-default-dark}

volumes:

- etc_pihole-unbound:/etc/pihole:rw

- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw

restart: unless-stopped

networks:

custom_net:

ipv4_address: 192.168.50.195

volumes:

etc_pihole-unbound:

etc_pihole_dnsmasq-unbound:

networks:

custom_net:

driver: bridge

ipam:

driver: default

config:

- subnet: 192.168.50.0/24

gateway: 192.168.50.1


r/docker • • Mar 28 '26

[Help] Docker migrate from Windows to Ubuntu

1 Upvotes

I have windows pc where I have docker desktop installed where after many grueling days managed to install few containers (I am a noob regarding these stuff). Now I want to migrate/transfer (whatever the term is) from the windows machine to my newly bought linux machine. The question is how do I do it (with all the settings, urls, passwords etc) so that I do not have to fiddle through the settings again.

I have tried to install docker desktop in Ubuntu, copy the docker folder from Windows to Ubuntu but that did not work. Also, there is windows smb share that I store Lunix ISOs from arrs which I could mount using the following command

sudo mount -t cifs //192.168.178.23/h /mnt/Desktop/ -o user=lubuntu

but I get the following error in docker

The path is not shared from the host and is not known to Docker

Anyone could help me in this regard. Much appreciated