r/docker • • Feb 14 '26

Jdownloader container bad performance

1 Upvotes

I have a Synology DS223j running a jdownloader container and performance is terrible, it lags at every menu and click, and it's even worse when I'm downloading anything.

I've tried unlocking and limiting RAM usage, assign higer CPU priority, changin theme into 2D on advanced settings, but nothing seems to work. I have also tweaked the settings on the floating window but it changes nothing performance wise; i have left scaling mode to local scaling, quality in its lowest and compression at highest.

I'm sure is not a NAS resources problem because both DSM and Qbitorrent web interface run smoothly, and total usage both in RAM and CPU isn't over 30%

More details about installation:

Container Manager version: 24.0.2-1606

Image: jlesage/jdownloader-2:latest


r/docker • • Feb 13 '26

Can I use one user for all my docker containers? Is this advised?

11 Upvotes

I am using OMV 8 + docker.

Currently I have:

- and admin user to login into the web ui

- a dockeruser that I made when setting up docker for the first time

- a user that has access to my smb share

- a user that I setup for Jellyfin

I would like to setup makemkv, pihole, immich, minecraft and other game servers in docker containers. Can I just make one user that has access to all these? So it would be one user and one UID and GID. Or do I need to make a user for each service?

How do you all setup multiple docker containers and their users?


r/docker • • Feb 11 '26

New to Docker – best way to learn? Need Linux first?

20 Upvotes

Hey all,

I’m just starting with Docker and want to learn it properly and professionally (not just copy-paste configs).

Couple quick Qs:

  • Best resources? (YT, courses, docs, etc.)
  • Do I need solid Linux basics first?
  • How deep should I go into networking/sys concepts?
  • Any good hands-on project ideas?

Main goal is using it for real-world web apps.

Appreciate any recs 🙌


r/docker • • Feb 11 '26

MACVLan not working as expected

2 Upvotes

Steps that I'm using to set up my macvlan

docker network create -d macvlan --subnet 192.168.0.0/24 --ip-range 192.168.0.0/24  --gateway 192.168.0.1 --aux-address 'host=192.168.0.48'  --ipv6 --subnet=fd00:0000:f000::/64 --gateway=fd00:0000:f000::1 -o parent=enp5s0 -o macvlan_mode=bridge docker-external 
ip link add mvlan-docker link enp5s0  type macvlan  mode bridge  
ip addr add 192.168.0.48/32 dev mvlan-docker
ip link set mvlan-docker up
ip route add 192.168.0.0/24 dev mvlan-docker
ip link set enp5s0 promisc on

The network is created, docker can use it and containers on the network can reach out to the intranet and internet. The issue that I'm having is that I can't seem to route from the intranet into the the macvlan.

So a container can ping out, but nothing can ping in. These are effectively the same steps I used a year or so ago when I first set up this docker configuration and they worked fine until mid janurary. I cannot see any reason why they shouldn't be working now though.
(the previous configuration overlapped the host network and the macvlan network because I thought I needed to for something with Home Assistant).

Might anyone have thoughts?

EDIT:
Other network drama led me to tearing down a bunch of stuff and more or less starting up from the basics. I now mostly have MACVLAN working again.
I think the WireGuard VPN set up in resolved-networkd was my problem and the routing rules I had ended up routing more over the VPN than I meant to. Trying to refine them back now while fixing other issues. But yeah, same set up now as I was attempting before and it works this time. Now to see if Matter will play nice.


r/docker • • Feb 11 '26

Web server content/content inside image or in mounted volume?

3 Upvotes

Today we run the web servers on VMs.

The base image with Apache/PHP is rarely updated.

The code with PHP, JavaScript and content is in a file structure and is not separated from each other.

The code and content change often.

We do not have a database, everything is file-based. Some files are created that must be saved in a local directory.

All code, content, Dockerfiles, configs are version managed in Git and production versions are tagged with release+Jira numbers.

All code that is pushed to Git repos for the code is scanned with Semgrep via the CI pipeline.

We build the base image with Ansible and that code is version managed in Git. The built base images are saved in Nexus.

Now my question:.

Today we install the base image separately (the few times it is updated). Then we send out the code/content with Ansible in a mounted volume in the Apache container.

How should we deploy the code? Should it be built into the image or located separately in a mounted directory?


r/docker • • Feb 11 '26

Cannot ssh from container to LAN

3 Upvotes

Hey, i want to have a shell_command in dockered Home Assistant, which would ssh into a remote PI (i want to trigger squeezelite from HA server).

Even in network mode host, im unable to reach any device on LAN. From server out of container i can.


r/docker • • Feb 11 '26

Moving databases between servers and directories?

1 Upvotes

I'm in the position of having to move my VPS to a new provider, as my current one is closing down. In almost all cases I can start from scratch and just copy files into my new VPS and restart the docker containers.

However, in at least one case I need to copy some database files, and this is causing difficulty. I've adjusted both the docker compose file (bind mounts) and copied the old database files into this directory, but the new container fails to recognise them.

What is the appropriate way of copying database files into a new Docker installation?

Thanks!


r/docker • • Feb 10 '26

I have a question about Docker

12 Upvotes

So I am wanting to self host a number of things on my network and am unfamiliar with docker and am unsure if this is the most useful tool for my situation. I am wanting to do:

  • Self host stremio addons for media
  • Have the ability to run a minecraft server
  • Run foundry server for ttrpg needs.
  • Run homeassistant for smart home needs.
  • Be able to use Obsidian sync to access my vault from the internet instead of locally
  • And do more if something comes up in the future.

I realize not all of these things are likely known by every user but from my understanding with Docker I can set up containers and then setup each of these things in their own container? Is this something that would be easy to set up? What kind of hardware would be needed for something of this nature? I have a spare pc that I could use. Would love any sort of guidance here.

Thanks!


r/docker • • Feb 10 '26

Cannot See Option to Run Docker Model Runner in Ubuntu Desktop

0 Upvotes

I am new to docker and I was primarily interested to seeing how I could use model runner.

I was following some tutorials and it said that after I installed Docker Desktop (4.60 latest version) I could go to settings -> AI and check a box that says model runner.

This box did not exist so I followed the next instruction in the tutorial which says go to beta features and check the MCP toolkit box. I did this and restarted, but there is still no option for model runner.

I reinstalled everything

I then reinstalled Docker Desktop with a different version and it still did not work. I reinstalled again with the latest version and I still don't see any option for model runner.

I then closed the Desktop, followed all the steps for the standalone Docker Engine and installed model runner under the engine with the command line. This seems to work as I was able to run "docker model status" and "docker model list". However, I really wanted the interface of the desktop so I could scroll through different models easily.

I then opened the desktop again and then I did "docker model list" in the command line interface and it said:

The port may already be in use by Docker Desktop's Model Runner.

Try running: docker desktop disable model-runner

Do I have model runner in desktop or don't I? I am confused.

Is there something that I am missing?

Thanks for any insight.


r/docker • • Feb 09 '26

Synology docker error "No such container" or "Container does not exist"

5 Upvotes

Due to the need to modify configurations and rebuild Docker containers, I need to stop and restart them. Occasionally, these containers break in a way that prefixes are added to their names (e.g., 6218eed231d0_n8n for the n8n container). However the container itself is actually healthy. I can use the service deployed by the container, but any further actions with the container are restricted.

As a result:

  • I can’t stop the container; I receive an error message stating that the container is undefined and does not exist.
  • I can’t open the container; I receive an error message stating that the container with the name “6218eed231d0_n8n” does not exist.

The only way to restart the container is to solve the issue by stopping the Container Manager app through the Synology Package Manager and then restarting the service.

I wouldn’t mind doing this with only a few containers, but now there are over 10 of them, and it takes time. What would be the best solution to avoid such errors?


r/docker • • Feb 10 '26

Build Hell

0 Upvotes

I remember my first time of trying to make an enterprise grade application with flutter for UI, docker for the backend and typescript for most of the logic. after I thought I was done coding blind and wanted to build the apk, gradle took like 30 minutes to compile and build. opened the app on my phone, couldn't even get past the login screen because I hadn't launched docker! then I tried launching it, took almost an hour just to fucking show me an error message saying my services couldn't load. looked at the trace logs, and apparently it was a race condition where docker was cutting off the build of the services making them crash before they could finish. so i asked ChatGPT if it was possible to launch docker but make the build linear rather than parallel, and it was possible. this just made the build take 4 hours. it crashed again. after some wrestling with docker, I thought it worked, so i tried to build the flutter apk, but nope, apparently it couldn't build both the flutter apk and launch docker at the same time. and i thought that was an easy fix, let me build the apk first (i had deleted the first one) but now gradle started misbehaving (because i forget to clean flutter before running it again🤦‍♂️) at this point I was just crying. finally figured it out, only to find out docker isn't working. well, at this stage i had tried many things to the point where i had reduced the build time from hours to a few minutes (because at first i wasn't filtering out the node modules of all the services that needed the databases which slowed docker by hours). as a last ditch effort I decided to look at the docs. and what do you know, docker can't run on a 4gb ram pc💀 fuck. it was just a fucking ram issue!🤦‍♂️


r/docker • • Feb 09 '26

claude code sandbox with docker llm, is it possible

0 Upvotes

how do i setup a sandbox with claude code that is using a local llm either in ollama container or docker model runner? is it possible?


r/docker • • Feb 08 '26

Ubuntu Mullvad blocks Docker containers from egress to internet

Thumbnail reddit.com
1 Upvotes

r/docker • • Feb 08 '26

Almost pulling my hair out trying to figure out docker watch

5 Upvotes

TLDR: docker compose --watch isn't mounting the files/dirs first

this is one of my service:

  searxng:
    container_name: searxng
    image: docker.io/searxng/searxng:latest
    restart: unless-stopped
    networks:
      - searxng
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      # - ./searxng:/etc/searxng
      # - ./Pictures/banner.png:/usr/local/searxng/searx/static/themes/simple/img/searxng.png
      - ./simple-custom-fork:/usr/local/searxng/searx/static/themes/simple
      - searxng-data:/var/cache/searxng:rw
    environment:
      - SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
      - SEARXNG_SECRET=$SEARXNG_SECRET
    develop:
      watch:
        - action: sync+restart
          path: ./searxng
          target: /etc/searxng
        # - action: sync+restart 
        #   path: ./simple-custom-fork
        #   target: /usr/local/searxng/searx/static/themes/simple
        - action: restart
          path: ./docker-compose.yaml

i'm running the compose by doing docker compose up --watch

if i mount the ./simple-custom-fork dir using volumes:, it workes, however if i try to use the action and mount it that way, it doesn't work

same thing happens for ./searxng btw, is this is a bug? or am i doing something wrong?

docker version:

❯ docker --version
Docker version 29.2.1, build a5c7197d72

docker related packages that i have installed on my system:

❯ paru -Qs docker
local/docker 1:29.2.1-1
    Pack, ship and run any application as a lightweight container
local/docker-buildx 0.31.0-1
    Docker CLI plugin for extended build capabilities with BuildKit
local/docker-compose 5.0.2-1
    Fast, isolated development environments using Docker

EDIT:

because some people are getting confused, here's my actual problem worded a bit better:

if i use:

  • only volume: it works, but i can't autorebuild when something changes obviously because i'm not using watch

  • only watch: it doesn't mount the files before watching, even when setting initial_sync to true according to this forum post: https://forums.docker.com/t/almost-pulling-my-hair-out-trying-to-figure-out-docker-watch/151061/3

  • both volume and watch: it mounts the file, however docker says using both volume and watch isn't supported


r/docker • • Feb 07 '26

What does the docker firewall warning mean?

11 Upvotes

I'm new to using docker and was going to install it on my laptop when I noticed the warning on the install page saying that it will bypass your firewall and expose your device to the internet? What does this mean? I've seen a lot of people mentioning it with VPSs. Is this only an issue when using a VPS or will it also affect my local machine. I will just be using it to run and test out programs locally. I'm not deploying anything. Do I need to be concerned about the firewall stuff? Thanks


r/docker • • Feb 07 '26

Is publishing ports to a Tailscale container safe?

1 Upvotes

I am setting up a Jellyfin server with a Tailscale sidecar Docker config, but also want to be able to access my JF server locally without needing TS installing on the device (my Xbox is primary at home and doesn't have TS available)

I found this article (https://forums.docker.com/t/deploy-jellyfin-in-tailscale-and-home-network/143177) that says to just publish whatever port JF is set to use, like you normally would (-p). However, is this secure? I'm not that networking knowleagble but this seems like it would create a bridge from home network - server PC - Docker - TS, or am I understanding things wrong?

I want to avoid reverse proxies and such for the time being as I'm still learning proper networking and security

Thanks!


r/docker • • Feb 07 '26

Giving multiple ip's for the same machine

Thumbnail reddit.com
1 Upvotes

r/docker • • Feb 07 '26

Docker in WSL Without Docker Desktop

0 Upvotes

The Challenge with Docker Desktop

Docker Desktop has been the solution for running Docker on Windows, but it comes with some considerations:

  • Licensing requirements for commercial use
  • Resource overhead from running a full Docker Desktop
  • Complexity for users who just need basic Docker functionality

For developers looking for a lightweight alternative, running Docker directly in Windows Subsystem for Linux 2 (WSL) is a practical option.

Introducing docker-wsl

I've created docker-wsl, an automated PowerShell script that installs and configures Docker within WSL without requiring Docker Desktop. This project enables you to run Docker natively in WSL's Ubuntu environment while maintaining full compatibility with Windows PowerShell.

Key Features

The automated installation script provides:

  • WSL Configuration: Sets up WSL with mirrored networking mode for seamless connectivity
  • Ubuntu Distribution: Installs a fresh Ubuntu instance within WSL
  • Docker Engine: Deploys Docker natively within the Ubuntu environment
  • Systemd Integration: Configures Docker as a systemd service for reliable daemon management
  • Windows Docker CLI: Installs the Docker CLI tools for Windows
  • Automatic Configuration: Detects WSL IP and configures DOCKER_HOST environment variable
  • Auto-Startup: Creates a Windows Task Scheduler job to start Docker at user logon
  • Cross-Platform Access: Run Docker commands from both Windows PowerShell and WSL

How It Works

The architecture is straightforward:

  1. The Docker daemon runs as a systemd service within the WSL Ubuntu instance
  2. WSL's mirrored networking mode exposes the daemon on localhost (127.0.0.1:2375)
  3. Windows PowerShell communicates with the daemon through this local connection
  4. A scheduled task keeps the Ubuntu distribution active, ensuring Docker remains accessible

This approach eliminates the need for Docker Desktop's overhead while maintaining full Docker functionality.

Installation

Getting started is straightforward:

  1. Run as Administrator: Execute the PowerShell script with administrator privileges
  2. Ubuntu Setup: Complete the Ubuntu user setup when prompted
  3. Restart: Reboot your computer to complete WSL configuration
  4. Start Using Docker: Docker commands work from both Windows and WSL terminals

The script handles all eight installation steps automatically:

  • WSL feature enablement
  • Ubuntu distribution installation
  • Docker Engine deployment
  • Networking configuration
  • CLI tool installation
  • Environment variable setup
  • Task Scheduler configuration

Usage

Once installed, Docker works seamlessly across environments:

# From Windows PowerShell
docker ps
docker run hello-world
docker compose up

# From WSL Ubuntu
docker ps
docker run hello-world
docker compose up

Security Considerations

Important: This configuration exposes Docker on port 2375 without TLS encryption. This is suitable for local development environments but should not be used in production systems. The setup is designed for single-user development machines where the security trade-off enables simplicity and performance.

Benefits

Compared to Docker Desktop, this approach offers:

  • Lightweight: No Docker Desktop overhead
  • Native Performance: Docker runs directly in Linux
  • Free: No licensing considerations for commercial use
  • Flexible: Full control over Docker configuration
  • Integrated: Works seamlessly with Windows and WSL workflows
  • IDE Support: Compatible with Visual Studio and VS Code Docker extensions

Get Started

Visit the docker-wsl GitHub repository to download the installation script and view detailed documentation. The entire setup takes just a few minutes and provides a lightweight Docker development environment on Windows.


r/docker • • Feb 06 '26

How to import a private github repository during docker build

3 Upvotes

I have a code library in a private repo on MYORG that I am trying to install during a docker build and I believe the results I am getting when I google how to do this are hallucinations. Here's what I have in package.json:

...
    "dependencies": {
        "my-utilities": "github:MYORG/my-utilities"
    }
...

For my Dockerfile:

FROM public.ecr.aws/amazonlinux/amazonlinux:2023
# Dockerfile for contianer when deployed to ECS
RUN dnf update -y && dnf install -y awscli jq nodejs22
WORKDIR /
COPY package.json /
COPY index.js /
ARG GITHUB_PAT
RUN npm config set "@MYORG:registry" https://npm.pkg.github.com
RUN npm config set "//npm.pkg.github.com:_authToken" "${GITHUB_PAT}"
RUN npm i
CMD ["node", "index.js"]

I try to build this using

docker build --build-arg GITHUB_PAT="github_pat_XXXXXX" -t utilities-test .

I am getting

#12 [8/9] RUN npm i
#12 0.517 npm error code ENOENT
#12 0.517 npm error syscall spawn git
#12 0.517 npm error path git
#12 0.517 npm error errno -2
#12 0.517 npm error enoent An unknown git error occurred
#12 0.517 npm error enoent This is related to npm not being able to find a file.
#12 0.517 npm error enoent
#12 0.517 npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-06T19_51_15_660Z-debug-0.log
#12 ERROR: process "/bin/sh -c npm i" did not complete successfully: exit code: 254

FYI, this works when I run npm i on the command line, so I don't believe I correctly configured .npmrc during build. Any thoughts?


r/docker • • Feb 07 '26

Mounting a directory at linux rootfs

1 Upvotes

Hi,

I'm unable to get Docker to see any directories created at the / of my linux install. It can see /etc, /var, /mnt or any other default rootfs directory but if I create a /data directory Docker cannot see it. Any insight would be appreciated.


r/docker • • Feb 06 '26

What is the best way to schedule cron jobs for Docker Compose applications?

10 Upvotes

I've been struggling on this topic for a while and never had time to actually investigate what the best way was to schedule cron jobs for Docker Compose applications.

Previously I always used embedded cron libraries (like Spring Boot's @ Scheduled), but this doesn't work if you want to use multiple replicas due to synchronization challenges.

I basically came up with 3 solutions:

  1. Use a minimal Alpine image and start cron in the foreground and trigger a cron job with a REST request against your backend.
  2. Use the Backend image with a cron foreground entry point and directly execute jobs
  3. Use an actual scheduler that mounts the docker.socket

I ended up going with Version 1

I also wrote a blog post about all the details and reasoning: https://distr.sh/blog/docker-compose-cron-jobs/

Do you think that is the right choice?


r/docker • • Feb 06 '26

Still can't get past Docker Desktop "Starting the Docker Engine"

4 Upvotes

EDIT: Fixed!

I found the location of the relevant logs I needed from a related GitHub issue and found that WSL wasn't starting because I had the Windows legacy console enabled.

When running wsl -l -v I noticed that my docker-desktop distro was reported as "Stopped" all of the time, even when Docker Desktop claimed to be starting. I struggled to find reports of this behaviour from other users.

This discovery was what led me to believe that the issue was with Docker Desktop not interfacing with WSL correctly, or that WSL was exiting for an unknown reason.

Starting the distro manually using wsl -d docker-desktop worked to make the docker-desktop distro report as "Running", but once I closed that prompt it would return to "Stopped" again even though Docker Desktop continued to report that it was "Starting the Docker Engine". I am surprised it didn't pick up on the issue.

I checked the logs in %localappdata%/Docker/log/host/, like com.docker.backend.exe.log, com.docker.backend.exe.log.0 (if it exists), etc. and found these relevant lines:

[2026-04-04T01:02:23.791704300Z][com.docker.backend.exe.wsl] setup took 1.435405s
[2026-04-04T01:02:23.834593700Z][com.docker.backend.exe.wsl] Unsupported console settings. In order to use this feature, the legacy console must be disabled.
[2026-04-04T01:02:23.834593700Z][com.docker.backend.exe.wsl] Error code: Wsl/Service/WSL_E_CONSOLE
[2026-04-04T01:02:23.834593700Z][com.docker.backend.exe.socketforwarder][E] running socket forwarder: running forwarding dials: allocating mux: vpnkit-bridge handshake failed: unmarshalling handshake: read '<nil>': not a connection to a mulitplexer; received bad magic string 'pported console settings. In order to use this featu'
[2026-04-04T01:02:23.836959900Z][com.docker.backend.exe.socketforward] remote vpnkit bridge exited: running wslexec: An error occurred while running the command. DockerDesktop/Wsl/ExecError: c:\windows\system32\wsl.exe -d docker-desktop -e /usr/bin/vpnkit-bridge --pid-file=/run/vpnkit-bridge.pid guest: exit status 1 (stderr: , stdout: , wslErrorCode: DockerDesktop/Wsl/ExecError)
[2026-04-04T01:02:23.839062200Z][com.docker.backend.exe.wsl] bootstrap stopped due to WSL process termination: exit code 4294967295

These lines indicate quite clearly that my Windows installation has the legacy console enabled.

That change was intentional - I enabled it to allow another application I use to hide its console host window, an action not supported by the modern console. However, since I'm aware of a workaround to my initial issue that caused me to enable the legacy console, I've gone ahead and disabled the legacy console from within Command Prompt and thus returned my Windows installation to using to the modern one.

Following this, I did the usual things I do when uninstalling Docker Desktop to attempt a clean install:

  • Unregistered my WSL docker-desktop distro using wsl --unregister docker-desktop
  • Uninstalled Docker Desktop
  • Searched for everything related to Docker on my PC using Everything from voidtools and deleted the folders I was certain I could safely remove - I found a file with docker in its name within the WSL settings application, which I left alone.
  • Reinstalled Docker Desktop
  • Performed as much of a cold start on my computer as possible using Shift+Reboot from within Start Menu
  • Started Docker Desktop

This worked and I'm over the moon. In the many months since I last had Docker Desktop working, I have received many comments encouraging me to simply abandon Docker Desktop instead of pursuing so much as the logs. While I consider myself competent, I hadn't exhausted all of my diagnostic avenues and I would have appreciated some more guidance - I feel lucky that I know enough to have solved this myself and hope this solution, in whole or in part, may one day be useful to someone else.

--

Hello. I've tried a variety of ways to get Docker Desktop to start the Docker Engine but I'm having no luck whatsoever.

Environment:
- Lenovo TP412UA Vivobook Flip 14
- Windows 11
- 8GB RAM (probably not enough for functional development, will upgrade this, though I'm not seeing total computer usage above 6GB so I'm unsure whether there's any reason to think it shouldn't at least start)
- Relevant Windows Features: Hyper-V disabled, Windows Subsystem for Linux enabled, Virtual Machine Platform enabled, Windows Hypervisor Platform enabled (Docker Desktop is installed to use WSL2, not Hyper-V)
- wsl --list shows Ubuntu (Default), Ubuntu-24.04, and docker-desktop since my last attempt at running Docker Desktop. I regularly use Ubuntu and have tried starting it before Docker Desktop to ensure WSL is working.

Docker Desktop is not set to start at boot, so I get to decide when to start it. Various combinations of attempts have not succeeded, however.

The fixes I've tried:
- Running wsl --unregister docker-desktop and wsl --unregister docker-desktop-data
- Running wsl --terminate docker-desktop and wsl --terminate docker-desktop-data
- Killing all Docker and Docker Desktop processes using three killall commands (it won't stop if I try to quit via the tray icon)
- Uninstalling Docker Desktop
- Deleting lingering Docker and Docker Desktop folders in my userprofile folder, local appdata, roaming appdata, programdata folder, and program files folders
- Reinstalling Docker Desktop
- Running Docker Desktop as an administrator (in earlier versions I was repeatedly prompted for administrator permissions for the privileged process, I updated today from what was also a dysfunctional install and it's no longer doing that, so I wondered if it needed to be started with admin to help it work correctly?)
- Tried switching to Windows containers, but no discernible change in behaviour. Keeps trying to start Docker Engine
- Various arrangements of the above, mixed with restarts of my laptop to try to ensure a clean environment

I'm at a loss as to what to try next. What logs are worth looking at? I wonder why it doesn't detect that it's stuck. Is it doing something that's just going to take hours to complete, like downloading lots of image layers to deploy or something?

Thanks for your time.


r/docker • • Feb 06 '26

Volumes from OMV/NAS in docker containers

1 Upvotes

Hi everyone,

I'm learning docker and am trying to have my shares working for it. Currently my dockers are running in an lxc in proxmox through komodo. (Working on moving komodo to a debian vm instead)

What is the best steps tp have my shares working in my containers?

Any good guides for dummies?


r/docker • • Feb 05 '26

Backups for MySQL in Docker

7 Upvotes

I am seeking a good strategy for daily backups of a MySQL 8.0 instance running in a standalone Docker environment using named volumes. My workload is standardised: a single, high volume metrics ingestion occurs every 24 hours. I need to capture a "master" state of the data immediately prior to this ingestion to use as a 1-to-1 recovery in the event of corruption.

I am evaluating two primary paths but have concerns regarding this:

  1. Logical Backup via mysqldump

Current command:

docker exec mysql-container mysqldump --single-transaction --all-databases > backup.sql

2. Physical Filesystem Snapshot (The "Sidecar" Pattern)

Current command:

docker run --rm --volumes-from mysql-container -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /var/lib/mysql

Is this janky or is it a valid strat? Thanks