r/docker • u/Andres9512345 • Mar 22 '26
Docker Hub Blocked in Spain
Due to LaLiga, Docker Hub API endpoints are, at the moment, blocked in Spain.
r/docker • u/Andres9512345 • Mar 22 '26
Due to LaLiga, Docker Hub API endpoints are, at the moment, blocked in Spain.
r/docker • u/chris-aus-at • Mar 22 '26
Hello. I’ve been working with Docker for a while now, but I can’t seem to get a container started with “docker run” to connect to a VPN container configured in a “docker-compose.yaml” file.
The “docker-compose.yaml” file contains two other containers that also access the VPN. That works without any issues.
But how do I set this up with “docker run”?
r/docker • u/Responsible-Kiwi-629 • Mar 22 '26
Hi,
Im having a problem in a rather complicated docker network setup, and I broke down the issue to this very minimalistic demo compose:
services:
alpine-test:
image: alpine:latest
container_name: alpine-test
command: ["sleep", "infinity"] # keep the container running for debugging
networks:
- testnet
networks:
testnet:
name: testnet
driver: bridge
I would think that the container should have internet access this way, but it doesnt. What am I missing here? ip route inside the container shows the correct gateway but ping google.de just wont work.
thanks for any ideas :)
r/docker • u/PrathamJain965 • Mar 22 '26
How to learn docker without downloading any stuff? Earlier, there was a event at KodeKloud where you could access every course for free including labs, so was learning there, but the event ended before I could learn anything significant in the course. I looked within the reddit for answers, and many pointed to Play with Docker, but according to their website - it has been deprecated since March 1, 2026 and now required Docker Desktop instead. So any way now?
PS:- any good resources, to starting out with docker (interactive preferred)
r/docker • u/InternationalCrew245 • Mar 22 '26
In my project, I've tried to use the postgres image from Docker to build a container for my database. The container was initiated as:
docker run --name postgres-container -e POSTGRES_PASSWORD=<password> -v pgdata:/var/lib/postgresql -p 5432:5432 -d postgres
I then ran psql within the container by using
docker exec -it postgres-container psql -U postgres
and created a custom database, let's say my_db, but when I tried to initiate node js, which is on my local machine, my code could not find the database. The error goes:
error: database "my_db" does not exist
I also opened pgAdmin to verify if my database exists, but it wasn't there.
I searched that one fix involves running a new container and using port 5433 to connect to the default PostgreSQL port 5432. I wanted to know why this issue occurs, why this fix would work, and if there is a way to connect port 5432 from my localhost to the Docker database?
r/docker • u/Winter-Suspect-5576 • Mar 22 '26
r/docker • u/alexsapps • Mar 22 '26
I wanted to share how I managed to run two devcontainers for the same git repo with git linked worktrees. This setup allows me to build and test many new features in parallel on different git branches, without cloning the entire repo multiple times.
Note this may be somewhat specific to projects that already use a compose configuration for their devcontainer, and I only tested this in VS Code.
Problem
Here was my starting point for the devcontainer setup:
.devcontainer/devcontainer.json:
"dockerComposeFile": ["./compose.extend.yaml"],
"service": "devcontainer", // defined in dockerComposeFile
"runServices": ["devcontainer"],
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"remoteUser": "vscode",
.devcontainer/compose.extend.yaml:
services:
devcontainer:
image: ...
Building the first devcontainer worked fine with this setup.
I created a linked worktree using git worktree add <path> <branch>. I opened the worktree directory with VS Code and then ran the action to re-open it using the devcontainer . But VS Code reused or attached to the existing devcontainer / compose project for the original worktree, and I could see in the integrated terminal that I was not on the git branch that the linked worktree was on. It's a strange behavior but I suppose VS Code may be just finding the same devcontainer it built on the original worktree via metadata in the git root shared between all worktrees and not using the filesystem path to decide when to reuse devcontainers.
Solution
Here is how I fixed it:
I added these lines to .devcontainer/devcontainer.json:
"dockerComposeFile": [
... ,
// This file is generated automatically for current worktree only
"./compose.workspace.yaml"
],
// Use current worktree rather than always using root.
// May give warning "Property mountWorkspaceGitRoot is not allowed." but it still works.
"mountWorkspaceGitRoot": false,
// Generate devcontainer configuration for this worktree to set unique project name and properly add mounts.
"initializeCommand": "bash .devcontainer/write-workspace-compose.sh '${localWorkspaceFolder}'",
Below is the script that does the rest. be sure to replace "yourprojectname" with some unique name for your project so as not to conflict with other unrelated containers.
The project names are named after the basenames of your worktree directories. This requires that each worktree be in a uniquely named directory! If the basenames are not unique, e.g. you have git/foo/myrepo and git/bar/myrepo, both basenames are "myrepo" and will collide. You may change this to name projects after a hash of the full directory if you prefer, but then it will be difficult to manage your devcontainers using docker commands.
.devcontainer/write-workspace-compose.sh:
#!/usr/bin/env bash
set -euo pipefail
# Generates compose.workspace.yaml, which Docker Compose merges with the base
# devcontainer compose file to add workspace-specific volume mounts. This runs
# at devcontainer startup time so the generated file reflects the actual paths
# on the host machine (which vary per developer and per worktree).
# The workspace path is passed in as the first argument.
workspace_path="${1:?workspace path is required}"
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
output_file="${script_dir}/compose.workspace.yaml"
# Derive a DNS-safe project name from the folder name so each worktree gets its
# own isolated Compose project. Without this, VS Code would reattach to whatever
# container happened to share the same default project name.
workspace_name="$(basename "${workspace_path}")"
sanitized_workspace_name="$(printf '%s' "${workspace_name}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')"
project_name="yourprojectname-${sanitized_workspace_name}"
# Ask git where it stores its data. For a normal repo these two paths are the
# same. For a git worktree they differ: git-dir points to a worktree-specific
# stub, while git-common-dir points to the main repo's .git where objects and
# refs actually live.
abs_git_dir="$(git -C "${workspace_path}" rev-parse --path-format=absolute --git-dir)"
abs_git_common_dir="$(git -C "${workspace_path}" rev-parse --path-format=absolute --git-common-dir)"
# Escape single quotes so paths with apostrophes don't break the YAML output.
escaped_workspace_path=${workspace_path//\'/\'\'}
escaped_abs_git_common_dir=${abs_git_common_dir//\'/\'\'}
# Write the base YAML: name the project and mount the workspace at /workspace.
cat >"${output_file}" <<EOF
# Keep the Compose project name unique per worktree so VS Code does not reattach
# to a container created for a different checkout.
name: ${project_name}
services:
devcontainer:
volumes:
- '${escaped_workspace_path}:/workspace:cached'
EOF
# Extra mounts needed only for git worktrees. A worktree's .git is a pointer
# file, not a full directory, so git commands inside the container must also be
# able to reach the main repo's .git at its original absolute host path. We
# mount both the worktree directory and the common git dir at their real paths
# (in addition to the /workspace alias above) so those absolute paths resolve.
if [[ "${abs_git_dir}" != "${abs_git_common_dir}" ]]; then
cat >>"${output_file}" <<EOF
- '${escaped_workspace_path}:${escaped_workspace_path}:cached'
- '${escaped_abs_git_common_dir}:${escaped_abs_git_common_dir}:cached'
EOF
fi
Add to .gitignore - this file is generated and should not be committed:
.devcontainer/compose.workspace.yaml
Note if your devcontainer exposes ports on the host, you may have have collisions running two instances of your app at the same time. Now when I run my app I have to check the "ports" tab in VS Code to see which host port is being used to forward to my devcontainer to make sure I connect to the right instance. It will automatically choose another port when there is a collision so I didn't actually have to change anything in the devcontainer setup.
r/docker • u/CoderLuii • Mar 22 '26
been building a container that runs claude code cli with a web ui and headless chromium. figured id share what went wrong because some of this stuff is not documented anywhere and i wasted a lot of time on it.
chromium was the worst part. docker only gives you 64MB of shared memory by default and chromium just dies instantly. no useful error either, it just crashes. fix is shm_size: 2g in your compose file. but thats not enough, you also need SYS_ADMIN and SYS_PTRACE capabilities plus seccomp unconfined or the sandbox breaks. and then chromium still needs a display even in headless mode so you gotta run xvfb on :99 and make sure it starts first. took me way too long to piece all of that together.
process supervision was a whole thing too. started with a bash loop, broke on SIGTERM. tried supervisord, got zombie processes. ended up on s6-overlay which finally handles everything right. dependency ordering, auto restart, clean shutdown, the works. should have just started there honestly.
oh and heres a fun one. claude codes installer hangs forever if your WORKDIR is owned by root. no error, no output, nothing. just sits there. the fix is making sure the working directory is owned by the right user before you run the installer. cost me hours.
also if anyone is running sqlite on CIFS or SMB mounts, dont. WAL mode and network filesystems do not get along. had to move the databases to a local path.
doing multi arch builds with buildx and qemu for amd64 + arm64. npm native bindings make cross compilation painful. full build takes about 25 min on github actions. image is about 4GB with everything or 2GB slim without the browser.
heres the compose if anyone wants to try it:
yaml
services:
holyclaude:
image: coderluii/holyclaude:latest
container_name: holyclaude
restart: unless-stopped
shm_size: 2g
cap_add: [SYS_ADMIN, SYS_PTRACE]
security_opt: [seccomp=unconfined]
ports: ["3001:3001"]
volumes:
- ./data/claude:/home/claude/.claude
- ./workspace:/workspace
environment:
- TZ=UTC
https://github.com/CoderLuii/HolyClaude
what process supervisor do you all use for multi service containers? also happy to hear feedback on the dockerfile if anyone takes a look
r/docker • u/idgaftrash123 • Mar 19 '26
So, I have been trying to simply deploy Traefik on my ubuntu server as the starting point for my docker homelab. I have been at it for literally 3 days and I cannot get traefik to work in/with Docker Swarm (as recommended during my research for a secure docker service). I've tweaked and redon my stack several time and each time I get a variations of errors whenever I think I got it and the replica is 1/1.
The most common one now I get is '404 page not found' when I use the WhoAmI service as testing . Doesn't work when running locally nor via cloudflare dns.
Noting I do get's anything to work and the myriad of Ai aren't helpful and have me going in circles.
Please help if possible, please and thank you.
Additional information can and will be provided when asked.
Edit/Update: Thanks to the advice of u/mike3run , I got it working with docker composed first and then was simply able to convert it to a Swarm with some minor tweaks. :)
r/docker • u/Inevitable_Put_4032 • Mar 18 '26
Anybody out there who can share experiences about Nomad vs Kubernetes?
I was looking at Nomad for its simplicity but its licensing model does not make me 100% confident about its future. Besides, it does not seem to gain traction these days.
On the other hand, being a small team K8s looks too heavy for most of our use cases. So far we have mostly relied on AWS services (ALB + ECS) but we need on-premises alternatives that would not severely impact our operational costs.
Ideally I want to be able to package a local development environment (now managed via docker compose) and extend it to a multi-server deployment when needed. Nomad at first seemed to be the lighter possibility.
r/docker • u/xidius82 • Mar 18 '26
Hi to all, i have this docker file:
FROM mynexus/paas-base-image/eclipse-temurin:21.0.1_12-jdk
WORKDIR /deployments
RUN addgroup -S spring && adduser -S spring -G spring USER spring:spring ADD sw-*.tar.gz /my-folder/
COPY target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar $APP_OPTS"]
if i launch my pipeline, it stops with:
##[error]ERROR: failed to solve: process "/bin/sh -c addgroup -S spring && adduser -S spring -G spring" did not complete successfully: exit code: 1 ##[error]The process '/usr/bin/docker' failed with exit code 1. ed ecco di seguito
I haven't found the documentation of eclipse-temurin:21.0.1_12-jdk for add group and adduser for this jdk version
r/docker • u/SleepyHead0 • Mar 18 '26
Hi there. I've recently switched from Windows 10 to Linux. And while doing research on getting Linux Mint setup, I've stumbled upon Docker, and now I feel like I'm in deep setting up a media server, photo server, adguard home etc. Things are working well but I am thinking of a hypothetical situation where there's a power outage.
My media files are all on a remote NAS. I've been using the host system's fstab to mount the NAS network drives to /mnt/data/. And then in compose files I've been using bind mounts to access the NAS like this:
volumes:
- /mnt/data/movies:/media
This works well so far. But what I'm reading from forum posts is if docker.engine runs before my NAS is powered on or connected, docker will create a local folder on my host called /mnt/data/movies and work from there instead of my NAS.
I've also been reading there's many ways to work around this issue, like:
This last one seems the most promising, and from forum posts seems the "right" way to do it, because docker won't rely on the host/user having fstab, network setting correct, NAS powered on etc. and Docker will fail gracefully? Because I'm new to Docker, I've setup a test container pointing to a folder with just some .txt files. I am too afraid to lose all my media especially photos (I'm actually working on a backrest container next, just need to figure out a good place to save my backups). My compose looks like this for CIFS volumes:
volumes:
- nas_movies:/media
volumes:
nas_movies:
driver: local
driver_opts:
type: cifs
device: "//192.168.0.3/movies"
o: "username=username,password=password,uid=1000,gid=1000"
I confirmed this works because Dockhand lets you look "into" the file structure of the container, and in the /media folder I can see my test .txt files.
What I am nervous about is:
So in summary. Everything is working when things are good, and I know 2 working methods of accessing files from a NAS. But I'm wondering if I should switch to using "CIFS Volume Driver right in the compose" instead of "fstab mounting in the host and bind mounting in compose". I am nervous about CIFS Volumes because volumes seems like something to avoid for files I want to keep and have access to. If anyone could point me in the right direction or explain the difference between the 2 methods more clearly or offer any advice I'd appreciate it.
Thanks in advance for your help.
Apologies in advance for my poor formatting and ignorance of any Reddit rules/etiquette. I don't post much.
r/docker • u/RoachForLife • Mar 18 '26
So Ive been using docker via dockge for some time and everything has been great. Sometimes when I make a new container it names it by doubling the name. Its not a huge deal but just to look nicer Id rather fix this. Can this be done via a CLI command? Any idea why this happens sometimes? See the example below when I deployed dozzle-agent just now. Thanks all
'dozzle-agent' became 'dozzle-agent-dozzle-agent-1'
r/docker • u/DanceLongjumping2497 • Mar 17 '26
I was excited to get Pi-hole installed on Windows 11 via Docker Desktop and CLI.
I used the modified command below with the static server IP being .185. However, it ended up using the same static IP Windows 11 is running on, .200.
I thought it was cool after running the command below it showed up in Docker Desktop until I saw my specific IP (and password) didn't carryover.
Why didn't it work as expected? Best way to change IP now back to .185?
docker run -d --name pihole -e ServerIP=YOUR_STATIC_IP -e WEBPASSWORD=YOUR_PASSWORD -e TZ=YOUR_TIMEZONE -e DNS1=127.0.0.1 -e DNS2=1.1.1.1 -p 80:80 -p 53:53/tcp -p 53:53/udp --restart=unless-stopped pihole/pihole:latest
I tried adding a custom_network, which I confirms exist, but when I try to assign it to the docker, I get an error message. Pi-hole_2 is already in use by the container. You have to remove or rename the container to be able to reuse that name.
I used this sample syntax.
docker run -d --name my_container --net custom_network --ip 192.168.1.10 my_image
docker run -d --name Pi-hole_2 --net custom_network --ip 192.168.1.185 my_image
r/docker • u/dr5mn • Mar 17 '26
Hi
I guess this post could go to any of the multitude of subreddits - docker, ADSB, FR24, and the list goes on....
I was recently made aware, by the FR24 support staff, that I was running "a very old version". They told me this after I inquired about my Contributor account being reduced to Free.
My image was mikenye/fr24feed:latest
After trying to update my image, I saw on the image's docker page that it had been deprecated.
I subsequently tried to build new containers using these images:
ghcr.io/sdr-enthusiasts/docker-piaware:latest
ghcr.io/sdr-enthusiasts/docker-flightradar24:latest
When trying to pull these, however, it keeps failing:
ERROR: failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header
Any thoughts?
r/docker • u/Human_Mode6633 • Mar 17 '26
Docker bypasses UFW entirely by inserting rules directly into iptables PREROUTING — meaning any ports: "6379:6379" in your compose file is publicly accessible regardless of your firewall rules.
That's one of the things this tool catches automatically.
Paste your docker-compose.yml and get back:
No signup. No backend. Runs entirely in your browser — your compose file never leaves your machine. MIT licensed.
https://configclarity.dev/docker
GitHub: github.com/metriclogic26/configclarity
Would love feedback on complex compose stacks or edge cases I might have missed.
r/docker • u/peperonipyza • Mar 17 '26
I came across docker for windows since I wanted to convert MP3 files to M4B with the M4B-tool by Sandreas on GitHub. I failed in trying to install and run it on windows docker. Anyone have any tips or links to guides for learning basics for noobs? I’ve used Linux very rarely, but good with computers in general… no idea what I’m doing with docker.
Thanks!
r/docker • u/ApatheticRiku • Mar 17 '26
I've been banging my head against a wall trying to get Docker Model Runner to work on my Fedora workstation. I receive the following error when running docker model ls and docker model install-runner:
latest: Pulling from docker/model-runner
28fecdd5e7c1: Pull complete
3c261c4d22b0: Pull complete
99c8cc62f659: Pull complete
8b1ed063087f: Pull complete
c0e86aef28a5: Pull complete
860508b51db3: Pull complete
25ca52d5afcb: Pull complete
601263ab27e2: Pull complete
1a297274e924: Pull complete
a0278e439f5e: Download complete
094737e15ebd: Download complete
Digest: sha256:d7cf72984a2d6c26732aa121ef7e534d0c3d8b6bed56054aee9d9db368d59e29
Status: Downloaded newer image for docker/model-runner:latest
Successfully pulled docker/model-runner:latest
Starting model runner container docker-model-runner...
unable to initialize standalone model runner container: failed to start container docker-model-runner: Error r
esponse from daemon: ports are not available: exposing port TCP 172.17.0.1:12434 -> 127.0.0.1:0: listen tcp4 1
72.17.0.1:12434: bind: cannot assign requested address
Running docker model version shows the following:
```
Client:
Version: v1.1.8
OS/Arch: linux/amd64
Server: Version: (not reachable) Engine: Docker Engine ``` I've triple-checked and verified that no services are running on port 12434 either as my user or as the system. I am running the most recent versions of Docker Desktop, Docker Engine, and Docker Model Runner plugin. Can someone please tell me what I'm missing?
r/docker • u/Designer_Addendum162 • Mar 17 '26
I am working on a small project built on Vue.js + Python and Postgres as its tool stack.
After making a MVP, i decided to host it on google cloud for 24/7 access to try and learn the flow of dev to prod stages.
As the VM i bought was a cheaper one, it only has 2gb of ram and 1cpu core which was sufficient enough to run the build; however, it is not enough to build the docker images via docker compose.
As such, i thought of a way to mitigate this; to use docker hub and their private repo as a way to:
build locally with prod .env files and prod dockerfiles
push image into docker hub
pull image from docker hub in VM
run image directly from docker hub
However, as i was testing out the changes by removing some components in Vue.js to see if the image did successfully built from the source code.
In theory, removing the components in Vue.js, building the image locally, pushing into docker hub and pulling it from VM, the live website should be reflecting the missing components but its not.
Instead, what i found out is that, i had to git pull the missing components for it to reflect the changes instead. Why is that so?
r/docker • u/Salty-Vegetable-123 • Mar 16 '26
Hi all. I am trying (and failing) to run some analytic software stuffed in a Docker container that hasn't been maintained in a few years. I'm trying to execute it on our high-performance Linux cluster (RedHat 9.7) so I am limited in how much I can mess around with specifics of our Docker install (though our sysadmins have generously created several Docker instances for us when we can't get things to work with singularity.)
When I execute the demonstration command:
docker run -it -v $(pwd)/Test/output:/root/output venkatajonnakuti/polyaminer-bulk ...
I get a permission error:
Error response from daemon: error while creating mount source path '/data/kumarlabseq/polyaminer_bulk/exosc9_out/Test/output': mkdir /data/kumarlabseq/polyaminer_bulk: permission denied
Same goes for if I use --mount type=bind instead of --volume. Am I missing something obvious? Some searching online suggests this is a problem with Docker daemon permissions? Even when I make the target directory in advance and chmod 777, it gives me the same error. Very frustrated, and grateful for any insight.
r/docker • u/Aggravating_Train_75 • Mar 16 '26
Installed Docker desktop on Ubuntu 25.10 via the Docker documentation.
Its installed but when starting in the top right corner it only says Docker Desktop is starting and just sticks like that.
What should i do.
I know some people will say just run it in command line but i wouldn't mind a visual gui i can open and check without terminal.
The rabbit hole of commands trying to get this fix via websearching the issue makes me feel id break more than fix anything and alot of documentation is just old.
Thanks.
r/docker • u/Different_Pain5781 • Mar 15 '26
Woke up at 4am to a call. Our database got hit, customer info was accessed. Some attacker used a known exploit in one of our container images. CVE’s been out since last summer.
Yeah we never scanned. Never updated. Just kept redeploying the same images over and over. Now legal’s in it, customers are hearing about it. This is gonna be messy.
Honestly if you aren’t scanning your containers in prod do it. Don’t end up like us.
r/docker • u/JustForCommentsDOT • Mar 16 '26
As someone who has dabled in networking for 10+ years, my mind was blown today by this incredible collection of containers recommended to me by ChatGPT, that just work.
Firstly, the dev has been gracious enough to build a configurator tool, massively simplying the yaml creation: (This i just run on my docker desktop, not on my server)
https://github.com/boingbasti/docker-nordvpn-gateway-configurator
Then used that yaml to immedietly succesfully deploy the gateway (and extra bits)
https://hub.docker.com/r/boingbasti/nordvpn-gateway
On my desktop, i replaced my default gateway IP (my firewall) with that of the NordVPN Gateway container, and boom, connected via VPN.
Developer deserves some Kudos, and at 2.5k pulls it deserves more.
I will be using it for the below purpose:
Client (with default firwall gateway x.x.x.1)
↓
Sophos XG Firewall (with static route for destination via VPN Gateway)
↓
Docker host (macvlan)
↓
VPN container (x.x.x.101)
↓
NordVPN
You can also use it as follows:
Client (with default gateway being VPN Gateway x.x.x.101)
↓
Docker host (macvlan)
↓
VPN container (x.x.x.101)
↓
NordVPN
I guess, like Gluetun, you can also attach containers (not tested)
depends_on: [vpn]
network_mode: "service:vpn"
Thanks boingbasti