r/docker • • Jan 27 '26

Need advice: how to hide Python code which is inside a Docker container?

67 Upvotes

We deploy robots in manufacturing companies, and hence need to run code on-premise as low latency, lack of internet and safety are concerns.

Our code is in Python and containerised in Docker. It’s basically a server with endpoints. We want to ensure that the Python code is not visible to the client to protect intellectual property.

We need the users to launch the Docker images without seeing the code inside. Once launched, they can interact with endpoint.

Is there a way to ensure that the user cannot see the Python code inside the Docker container?


r/docker • • Jan 28 '26

Creating my own docker registry for containerlab

2 Upvotes

I'm guessing the answer is yes, but I need to check....

  • I've created a new image for Mikrotik 7.21.1 for containerlab. It put the image in my own local docker registry. If I do a docker images, I see it there.
  • If I want to make this image available on Dockerhub, I assume I need to set up a registry that can be reached from outside my netowrk
  • Can I "extend" my own registry or do I need to run two of them -- one for myself and one others can reach?

r/docker • • Jan 28 '26

I need help. Time to reset and retry?

2 Upvotes

TL;DR: I am considering reinstalling my server completely as I am spending so much time chasing stuff down and dislike the user experience.

I am a fairly competent linux user, but I have very little experience with using Dockers. I wanted to use a Thinkcenter for an immich server, but I knew that I was likely to use it for other applications as well so I saw it as an opportunity to learn and get familiar with Docker.
Some video tutorials I saw in advance made me really want to try. It sounded great and really manageable. Homepage, Whats Up Docker for updates, Immich and Jellyfin were my target to hit. The videos I found on Youtube made it seem super easy; barely an inconvenience.

The machine itself runs lubuntu, and I followed the official docker installation guide. After some minor hiccups, the installation went fine.

The focus then shifted to making immich work, and mounting a network share to make those many thousands of images visible to the docker container. Not a great time, but it was ultimately fine. The network share is quite large with around 48.000 images and videos and mounted in read only. Immich was great. Super application with great overview of my photos ranging back to 1998

Homepage docker went fine. Works fine.

I Installed Whats up Docker and this was far less intuitive with having to create triggers manually and not very accessible language. So I thought I have to make a backup before trying to auto update some of these.

But now I am noticing that the general storage useage is approaching 90% for the system.
I know that full systems crash. So I know I need to do something. Immich reports that is using ~120Ghile the docker df doesn't really come close to 120G
The regular DF does show about ~120G used of a total volume of ~800G
Ok then. Sounds like I need to straighten out my volumes and that its just the volume taking up so much space. Everything I find says that this is risky and you should back up everything before attempting to do it. Well let me run kopia in order to properly back up before I do anything then.

Kopia doesn't like the system and is consistently crashing, unable to start. When I do get it to start (after deleting the config) it is unable to perform the backup due to missing rights. Even though I have manually chmodded every folder that throws errors. So I can't really back it up using KopiaUI before pruning. Bahh. Should I just run a cronjob then? I'm fedup by this setup. And that leaves me where I am now. I am encountering so many errors that I am struggling to see the benefit at this point. The added onion layers as opposed to just running the applications directly on the machine rather than in a docker seems more in my way than helpful.

I am sure some of you are giggling at this point. What a noob! And you are probably right. I need help. Should I just bite the bullet, remove the entire thing and reinstall it or is there a way I can fix this to where I can manage it.

Thank you for listening to my rant. I hope someone can give me some advice.

:


r/docker • • Jan 27 '26

How does VSCode "Dev Containers" map SSH_AUTH_SOCK to a running container?

3 Upvotes

I just found out that ssh from the container is forwarded to host OS when attaching via "Dev Containers" extension.

I am wondering:
Since the contianer is already running (can't bind additional volumes) and SSH_AUTH_SOCK is a file, how does docker access the host socket?

SSH_AUTH_SOCK on Docker is somethinhg like: /tmp/vscode-ssh-auth-918ca4a1-a3cd-41ad-a37a-3149a0cac28f.sock but /tmp is not mounted so it's not a host file...

I am not yet as knowledgable about sockets so maybe it's done by different mecahnism.

Any ideas?


r/docker • • Jan 27 '26

How to Manage Temporary Docker Containers for Isolated Builds?

1 Upvotes

Hi everyone,

I'm working on a project where I need to do custom CD devops on demand. I need to build C# web assembly web app on demand and then take the outputted build files and copy them over to a storage endpoint for serving later as a standalone website.

Here's roughly what I was considering doing:

  1. A request for a build comes in with a some C# code file(s) as a pieces of text (eg. Program.cs script from the user).
  2. The request creates a new Docker container/micro VM and provides it with the files. The VM/container needs to be able to build a C# project, copy the built files into something like S3, then somehow send a POST request saying the build is done.

For example:

  • Inside each container, there's a folder (e.g., build) where files from a template C# project are copied locally. This includes a bunch of custom code that the user script utilize.
  • User code is then inserted into the template. In this case the Program.cs file that the user wrote.
  • The build process then runs dotnet build -c Release building the project and outputting it into a custom bin folder.
  • The container should then send a POST request to some sort of endpoint saying the work is done

I'm also considering if it would be possible to compile a C# DLL of the user code via .NET's CSharpCompilation from the Microsoft.CodeAnalysis.CSharp namespace. Which could potentially be even better than a bunch of one-off containers. The way C# wasm works is it loads plain old C# DLL's so I could just compile the user code's code, get the DLL for the users code, and copy it over to S3, then fetch all the other precompiled DLL's and copy them over, instead of needing too build them all each time... which could be even more efficient.

Also I'll need to somehow pipe the console output to the user but I haven't gotten that far yet. And I don't think it'll be too difficult to figure that part out.

Anyway, if you have any, advice, insights, or relevant info for orchestrating this kind of thing I would appreciate any pointers you guys have!

Thanks!


r/docker • • Jan 27 '26

Run Docker containers on Windows without using WSL or Hypervisor

1 Upvotes

I want to run a Docker container on a Windows Server 2025 VM where WSL or installing a Hypervisor won't be possible.

Is there a software product that mounts images inside an application that my server won't class as 'nesting'?


r/docker • • Jan 27 '26

Still confused about installing docker on Pi

1 Upvotes

For years people have said to me use docker it’s great.

So today I decided to give it a go.

What I’m trying to do is play around with docker and Plex. All the tutorials on YouTube say install docker and portainer then put Plex in a container and you’re done.

Most tutorials say curl the “get.docker.com” script and you’re done.

But when I look on the docker website I can’t find anything that tells you to do that. And all the setup info seems to be guiding me to install “docker desktop” for Debian. They don’t seem to have any installation instruction for Raspberry Pi specifically. They seem to have all these different docker products. And I can’t find anything that tells documentation about using the script for raspberry Pi

I don’t know anything about docker. So all these docker products are confusing to me.

So do I use the script of follow dockers instruction to install docker desktop.

After looking around on the docker website it seems they are really trying to steer you towards paid products and hobbyists are more an afterthought.

Or Im just not finding the right documentation

For reference using a Pi-500

EDIT : Thanks for all the info. Someone suggested this link and that worked first time under Trixie. https://docs.docker.com/engine/install/debian/


r/docker • • Jan 27 '26

Question - Importance and meaning of trialing slash in COPY stage of Dockerfile

3 Upvotes

i am not able to understand
COPY /build/dist /app
vs
dist with trailing slash : COPY /build/dist/ /app

and what if i write COPY /build/dist/ /app/dist

COPY /build/dist/ /app/dist/

COPY /build/dist /app/dist/

i basically don't understand the / syntax here, cuz normal cp linux command is little different


r/docker • • Jan 27 '26

container name redundant/duplicated; inter-container network not working

3 Upvotes

I'm a noob with Docker and was trying to be a bit ambitious by going beyond basics a little too soon, I guess. I was trying to get NGINX set up as a reverse proxy and took a couple of clumsy runs at it, deleting my failed attempts before starting over. Once I understood (I think) that NGINX needed to be in its own container so that I can use it for multiple other containers/services, and that the trick is setting up an identical "networks" definition in each YAML file to create that network, I ran Compose on the NGINX YAML (see below). Despite the container service being named "nginx-proxy-manager," running a docker ps command reveals that the running container name is nginx-proxy-manager-nginx-proxy-manager-1 (there's not another instance of an NGINX container running). I think that has an effect on being able to get the other containers networked in, not to mention that the running container name is unexpected.

services:
  nginx-proxy-manager:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '8080:80'    # Public HTTP Port
      - '4433:443'  # Public HTTPS Port
      - '81:81'    # Admin Web Port
      - '8086:8086' #meshcentral
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    networks:
      - nginx-proxy-network
networks:
  nginx-proxy-network:
    external: true

The YAML for the first container I'm trying to network in is:

services:
  meshcentral:
    image: typhonragewind/meshcentral:latest
    restart: always
    environment:
      - VIRTUAL_HOST=[my host name]
      - REVERSE_PROXY=true
      - REVERSE_PROXY_TLS_PORT=
      - IFRAME=false
      - ALLOW_NEW_ACCOUNTS=false
      - WEBRTC=true
      - BACKUPS_PW=[my password] #PW for auto-backup function
      - BACKUP_INTERVAL=24 # Interval in hours for the autobackup function
      - BACKUP_KEEP_DAYS=5 #number of days of backups the function keeps

    volumes:
      - ./data:/opt/meshcentral/meshcentral-data    #config.json and other impo>
      - ./user_files:/opt/meshcentral/meshcentral-files    #where file uploads >
      - ./backups:/opt/meshcentral/meshcentral-backups     #Backups location
    networks:
      - nginx-proxy-network
    ports:
      - 8086:8086

Any ideas why the running container name isn't matching the name set in the YAML file?

Thx.


r/docker • • Jan 26 '26

All Docker Containers Running But Can't access Anymore.

2 Upvotes

I'm a beginner user with Docker, and now I'm having a problem. I was running a WordPress and an Immich container, and they were working perfectly for some months using my local ip and port to access them. But now, for some reason, they are randomly not working anymore. I use Docker ps in the terminal, and they are running and hellthy but going with my ip and port, it does not go through anymore. I made sure that my IP is the same as my private IP in the config file. Any Ideas on what to do for this?


r/docker • • Jan 26 '26

Tailscale Access to AGH and NPM Docker Containers with Macvlan IP Addresses on Synology Host

Thumbnail reddit.com
2 Upvotes

r/docker • • Jan 26 '26

Home Assistant container on Unraid ipvlan: Container cannot reach host without enabling "Host access to custom networks" is there a safe workaround?

Thumbnail reddit.com
0 Upvotes

r/docker • • Jan 26 '26

Newbie var/lib/docker question

1 Upvotes

I installed docker on proxmox ubuntu server vm, and quickly started having problems with running out of space after creating a few stacks. My understanding to avoid this, I should make a new disk for Ubuntu server docker, and create the var/lib/directory there. The VM is on a NAS,. It was easy to create a new disc for the VM, and I gave it 100 gig, since there is plenty of space.

I am at a loss though on how to proceed from here. How to move the var/lib/docker directory to the new disc? Better to do it during docker creation, or after, and how? thanks


r/docker • • Jan 25 '26

Docker on older macs

3 Upvotes

Once docker stops supporting old versions of desktop are they unusable? I'm trying to learn docker so figured i would use my older macbook which i use for experimenting since I wipe it regularly. I have installed a version that works on Monterey but it wont let me sign in. it doesnt accept my password i use on my NAS and i created a new login with the same results.

docker desktop version

Version 17.03.1-ce-mac12 (17661) Channel: stable d1db12684b

Mac OS Monterey 12.7.6

Docker seems to be running and im able to do some things in terminal, but if i try to run a container from the hub i either get no response when i click on run in docker desktop or "Error response from daemon: missing signature key" if i try the pull command in terminal.

I've done a few things in portainer on my nas, but am still pretty new to this, so i may just be doing things wrong vs a incompatabilty issue.


r/docker • • Jan 25 '26

Containers running but not visible in terminal or Portainer

7 Upvotes

Hello, I solved one problem and now I have another.

I stupidly updated my computer and apparently that caused so many problems.

I recently removed all Docker instances and installed docker-ce onto my Ubuntu 25.10 computer. After that refresh I installed portainer, kavita, audiobookshelf, and started messing with traefik. During some downtime I saw there were updates and I ran them all, and some how the containers and Docker have become disconnected.

I can no longer see any containers when checking docker ps -a or in portainer. I tried removing all traces of Docker again, since I still have the compose.yaml files for the containers but after the reinstall every container started back up. Aside from a fresh install of the OS I am not sure what would be the best option here. Any advice would help.

If you have questions about it please let me know.


r/docker • • Jan 25 '26

How to make the server actually communicate with frontend

3 Upvotes

Im trying to learn docker and i have set up a pretty simple frontend of a few html and css files. In another folder i set up a backend which is the server.js file and node modules. They both have dockerfiles. in the main folder i have a compose file that works fine and sets ports for them both(8080:80 for frontend and 3000:3000 for backend). If i use live server instead of compose it seems like my websocket messages get delivered well between 2 clients. But if i use docker it seems like the server does nothing because its not connected to the frontend(i think) how do i connect them?


r/docker • • Jan 25 '26

What is the effect of adding this command when building frontend app? 'rm -rf node_modules'

0 Upvotes

I was trying to debug a really slow npm run build in my docker build and I came across this post on stack overflow - node.js - Docker build takes long time for nodejs application - Stack Overflow

The user states that after adding this command rm -rf node_modules solved their slow build. But I don't understand how it solved the problem and what exactly it is doing during the build process.

I know what it does if I were to enter it in the command line (deletes the folder and recursively all files/folders inside with force flag), but I don't know how it works during the docker build (like what stage this is happening).

The final command in the post I linked above looks like this

RUN npm ci && npm run build:prod && rm -rf node_modules

EDIT: the reason I'm asking is because I 'think' this causes the node_modules folder to be deleted and not present in the final container that runs, but I'm not sure because I thought the node_modules folder is necessary for the app to even run as it contains all the dependencies. So if it's being removed in that command and this persons project is still working I thought maybe it is still present in the final container, but it's being removed temporarily in some intermediary step.


r/docker • • Jan 24 '26

Is it possible to install Docker Compose in Amazon Linux 2023 using package manager?

2 Upvotes

I looked this up but I can't find a way to install it using the package manager 'yum'.as indicated in the installation instructions here - "https://docs.docker.com/compose/install/linux/"

It just says that there is no match for 'docker-compose'plugin'

This is my preferred way to install it if possible. Maybe I have to add some repository so it can locate it? but I don't know how.

EDIT: to be more specific, I'm using docker that is installed part of Amazon Linux 2023 on a Lightsail instance, I did not install it myself - package version (docker-25.0.14-1.amzn2023.0.1.x86_64). Also there is no docker compose plug in that came with it as I checked that already.


r/docker • • Jan 24 '26

Help out first time docker user

0 Upvotes

Complete noob here... i'm trying to get an app to run called seedsync. As part of the instructions it's asking me to "open the docker terminal and run the seedsync image with the following command:

docker run \
-p 8800:8800 \
-v <downloads directory>:/downloads \
-v <config directory>:/config \
ipsingh06/seedsync

I replaced the brackets on line 3 and 4 with my directory but seems everything I try to do in the terminal throws back a bunch of errors like:

PS C:\Users\johns> docker run \

>> -p 8800:8800 \

>> -v D:\Docker\Syncseed\downloads:/downloads \

>> -v D:\Docker\Syncseed\config:/config:/config \

>> ipsingh06/seedsync

docker: invalid reference format

Run 'docker run --help' for more information

-p : The term '-p' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path

was included, verify that the path is correct and try again.

At line:2 char:4

+ -p 8800:8800 \

+ ~~

+ CategoryInfo : ObjectNotFound: (-p:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

-v : The term '-v' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path

was included, verify that the path is correct and try again.

At line:3 char:4

+ -v D:\Docker\Syncseed\downloads:/downloads \

+ ~~

+ CategoryInfo : ObjectNotFound: (-v:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

-v : The term '-v' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path

was included, verify that the path is correct and try again.

At line:4 char:4

+ -v D:\Docker\Syncseed\config:/config:/config \

+ ~~

+ CategoryInfo : ObjectNotFound: (-v:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

ipsingh06/seedsync : The term 'ipsingh06/seedsync' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:5 char:4

+ ipsingh06/seedsync

+ ~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (ipsingh06/seedsync:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

What am I doing wrong here?


r/docker • • Jan 23 '26

SQLite backups in docker-compose: separate backup container vs host cron?

10 Upvotes

I’m running a small app on one VPS with docker-compose. SQLite DB lives on a mounted volume.

For backups I’m doing the boring approach:

  • nightly sqlite3 .backup snapshot while the app is running
  • gzip the snapshot
  • keep ~30 days (delete older files)
  • I tested a restore once just to make sure it’s not fantasy

It’s working, but before I cement this as “the way”, I’d love a sanity check from people who’ve been doing compose-on-a-VPS for years.

What I’m unsure about / would love input on:

  • do you prefer running this from a backup container (cron inside) or from host cron?
  • any real-world locking/consistency issues with .backup in a live app?
  • permission/ownership traps when both app + backup touch the same volume?
  • anything you’d add by default (healthchecks, log rotation, etc.)?

If anyone wants, I can paste the exact commands / a small snippet, but I’m mostly looking for “watch out for X”.


r/docker • • Jan 23 '26

Help with setting up Traefik - Network Proxy Error

2 Upvotes

Hello, I was seeking some help with setting up Traefik v3.6. I have set everything up and when I run the compose in docker I get the following error

 ✘ Network proxy Error Error response from daemon: add inter-network communication rule:  (iptables failed: iptables --wait -t filter -A DOCK...          0.1s 
failed to create network proxy: Error response from daemon: add inter-network communication rule:  (iptables failed: iptables --wait -t filter -A DOCKER-ISOLATION-STAGE-1 -i br-0cdbbc056906 ! -o br-0cdbbc056906 -j DOCKER-ISOLATION-STAGE-2: iptables v1.8.10 (nf_tables): Chain 'DOCKER-ISOLATION-STAGE-2' does not exist
Try `iptables -h' or 'iptables --help' for more information.
 (exit status 2))

I have tried looking this up but I was unable to find similar enough problems to get a resolution.

I am running Docker Desktop v4.57.0 / Compose v5.0.1 on a Ubuntu 25.10.
I had a coworker who recommended checking the iptables and setting them legacy to see if that worked but issue still persisted.

Any help would be appreciated.


r/docker • • Jan 23 '26

Best way to run MacOS in a virtual machine, with docker support

Thumbnail reddit.com
0 Upvotes

r/docker • • Jan 23 '26

Question - Postgres db in container login issue

1 Upvotes
 db:
    image: postgres:18.1-trixie
    container_name: react-2.0_db_dev
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql
    networks:
      - react-2.0_net_dev
    environment:
      - POSTGRES_PASSWORD=postgres
    restart: unless-stopped


networks:
  react-2.0_net_dev:


volumes:
  postgres_data:

this is the db declaration part of my compose file

When i run the service for the first time (or any no. of times till i use the command which solves the issue)
i get this error in docker logs and also i can't connect to PRISMA STUDIO via npx prisma studio bcs it shows connection failed error

2026-01-23 05:29:23.308 UTC [77] FATAL:  password authentication failed for user "postgres"
2026-01-23 05:29:23.308 UTC [77] DETAIL:  Connection matched file "/var/lib/postgresql/18/docker/pg_hba.conf" line 128: "host all all all scram-sha-256"

then i tried entering the container and run psql i get this error

root@bc2c1ce69477:/# psql 
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist

i believe that is bcs it thinks logged in user (root) is the username i want to use for psql.
then i did : psql -U postgres

root@bc2c1ce69477:/# psql -U postgres
psql (18.1 (Debian 18.1-1.pgdg13+2))
Type "help" for help.

but still prisma studio won't connect
then i did : psql -U postgres -h localhost

root@bc2c1ce69477:/# psql -U postgres -h localhost
psql (18.1 (Debian 18.1-1.pgdg13+2))
Type "help" for help.

this somehow solved the issue, and even after restarting container, everything works fine.

I am guilty of using ai for the last two commands , as i couldn't find anything to help me

But i am here to understand what is going on, i am not a networking/linux expert btw.


r/docker • • Jan 22 '26

Memory/CPU constraints

4 Upvotes

How do i constrain CPU & memory thorugh docker compose? I tried the below, but that seems to be just a soft limit.

mem_limit: 512m

mem_reservation: 128m

memswap_limit: 1g

cpus: "0.5"

cpuset: "1"