2023-01-28T13:02:15+00:00https://www.redditstatic.com/icon.png//r/docker.rss[Docker](http://www.docker.io) is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.Docker: An open source project to pack, ship and run any application as a lightweight container/u/bayarea-devhttps://www.reddit.com/user/bayarea-dev<!-- SC_OFF --><div class="md"><p>Here's the cheatsheet for docker compose as people requested.</p> <p><a href="https://sweworld.net/cheatsheets/docker_compose/">https://sweworld.net/cheatsheets/docker_compose/</a></p> <p>Cool features: * you also now click to copy any code snippets or command. No need to select text anymore. * type in "cs docker-compose" to find this cheatsheet in your chrome address bar (needs <a href="https://sweworld.net/blog/quick_website_access_with_bunnylol/">bunnylol</a>).</p> <p>I'm also thinking about summarizing a k8s cheatsheet as well. Please vote any cheatsheet you'd like to see. Thanks!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/bayarea-dev"> /u/bayarea-dev </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10mu7im/a_simple_and_clean_cheatsheet_for_dockercompose/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10mu7im/a_simple_and_clean_cheatsheet_for_dockercompose/">[comments]</a></span>t3_10mu7im2023-01-27T19:51:03+00:002023-01-27T19:51:03+00:00A Simple And Clean Cheatsheet For Docker-Compose From sweworld.net/u/2p3https://www.reddit.com/user/2p3<!-- SC_OFF --><div class="md"><p>I'm using a pihole container as my DNS and DHCP server; therefore, i'm pretty much bound to run it in <em>host</em> network_mode. My docker host IP is 192.168.10.6.</p> <p>DNS resolution on my host is working fine both with "nameserver 192.168.10.6" (since pihole is running in host mode) and with "nameserver 127.0.0.1".</p> <p>A "default" container running in bridge network mode will use 127.0.0.11 as the default nameserver. To my understanding, this would translate to my docker host nameserver. But name resolution won't work, neither with the default configuration (127.0.0.11) nor with my host ip, 192.168.10.6. It will work fine with a public DNS server like 8.8.8.8.</p> <p>A tcpdump on my host when using 127.0.0.11 will show the DNS requests sent to 192.168.10.6, but no replies:</p> <pre><code>host:~# tcpdump -ni any udp port 53 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes [...] 09:42:50.371685 IP 192.168.48.3.39594 > 192.168.10.6.53: 13353+ A? google.com. (28) 09:42:50.371685 IP 192.168.48.3.39594 > 192.168.10.6.53: 13353+ A? google.com. (28) </code></pre> <p>On the other hand, when using 8.8.8.8 i can see both requests and replies:</p> <pre><code>host:~# tcpdump -ni any udp port 53 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes [...] 09:59:26.631291 IP 192.168.48.3.53062 > 8.8.8.8.53: 16222+ A? google.com. (28) 09:59:26.631291 IP 192.168.48.3.53062 > 8.8.8.8.53: 16222+ A? google.com. (28) 09:59:26.631351 IP 192.168.0.6.53062 > 8.8.8.8.53: 16222+ A? google.com. (28) 09:59:26.640122 IP 8.8.8.8.53 > 192.168.0.6.53062: 16222 1/0/0 A 142.250.180.174 (44) 09:59:26.640149 IP 8.8.8.8.53 > 192.168.48.3.53062: 16222 1/0/0 A 142.250.180.174 (44) 09:59:26.640153 IP 8.8.8.8.53 > 192.168.48.3.53062: 16222 1/0/0 A 142.250.180.174 (44) </code></pre> <p>Is there something wrong with my config? How can i fix this? A couple of ugly ways are coming to mind (like tinking with docker iptables rules and allowing them to talk to outside), but i was hoping on a cleaner solution.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/2p3"> /u/2p3 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10nb4oe/pihole_container_network_mode_host_cant_be_used/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10nb4oe/pihole_container_network_mode_host_cant_be_used/">[comments]</a></span>t3_10nb4oe2023-01-28T09:31:35+00:002023-01-28T09:31:35+00:00pihole container + 'network_mode: host' can't be used by containers with bridge network/u/Kopikoblackhttps://www.reddit.com/user/Kopikoblack<!-- SC_OFF --><div class="md"><p>I have a dockerfile likes this: <code> FROM node WORKDIR /app COPY ../../../../. . RUN npm install CMD ["npm", "run", "start", "app"] </code> But it doesn't build, my directory structure looks like this:<br/> <code> app/tools/docker/scripts/main/dockerfile app/tools/docker/scripts/main/docker-compose.yml app/tools/docker/scripts/main/.dockerignore </code> Sorry if this has been already asked if yes please point me to the link thanks!</p> <p>Is this even possible with docker? I tried moving the dockerfile and compose files on the root and it works using <code>COPY . .</code></p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Kopikoblack"> /u/Kopikoblack </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10nazdm/dockerfile_on_a_subdirectory_reference_parent/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10nazdm/dockerfile_on_a_subdirectory_reference_parent/">[comments]</a></span>t3_10nazdm2023-01-28T09:21:39+00:002023-01-28T09:21:39+00:00Dockerfile on a subdirectory reference parent error/u/rnmkrmnhttps://www.reddit.com/user/rnmkrmn<!-- SC_OFF --><div class="md"><p>Dear Docker Swarm mode users. I'm an independent developer and looking for possible room for improvement for Docker Swarm ecosystem. I'm a long time Kubernetes user and have never used Docker Swarm until today lol. It was extremely easy to use and compatible with compose yaml file? I'm mind blown by the simplicity. It also looks like it doesn't need external database to maintain any state for better or worse.<br/> Looks like it doesn't have any CSI, CNI support. You cannot easily attach AWS EBS volume directly to your docker volume etc.<br/> Please share your experience with the community, and leave your wish lists, pain points in the comments. Thanks.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/rnmkrmn"> /u/rnmkrmn </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10n4k2b/for_swarm_mode_users_what_features_do_you/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10n4k2b/for_swarm_mode_users_what_features_do_you/">[comments]</a></span>t3_10n4k2b2023-01-28T03:11:16+00:002023-01-28T03:11:16+00:00For Swarm mode users: What features do you miss/need from Kubernetes ecosystem?/u/Lanhua_Mahttps://www.reddit.com/user/Lanhua_Ma<!-- SC_OFF --><div class="md"><p>This is my dockerfile:</p> <p><code>dockerfile FROM alpine:edge RUN apk add --update something CMD ["/usr/sbin/something"] </code> Which is rather simple. </p> <p>However, I want to build for 386 and riscv64. Riscv64 alpine have separate repository named riscv64/alpine, and 386 have i386/alpine</p> <p>I wonder if there's a way to achieve this with only one dockerfile?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Lanhua_Ma"> /u/Lanhua_Ma </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10n8wj0/docker_buildx_how_to_build_multiarch_images_with/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10n8wj0/docker_buildx_how_to_build_multiarch_images_with/">[comments]</a></span>t3_10n8wj02023-01-28T07:08:37+00:002023-01-28T07:08:37+00:00Docker buildx: How to build multiarch images with base image named like riscv64/alpine/u/Magnetic_dudhttps://www.reddit.com/user/Magnetic_dud<!-- SC_OFF --><div class="md"><p>Found out that most results for a niche keyword like "emule" gives mostly spam/scam results with malware, how to report/flag for removal? Did not find a way, or at least is not visible from mobile</p> <p>Example of a few spammers:</p> <p><a href="https://hub.docker.com/r/roelderaset/">https://hub.docker.com/r/roelderaset/</a></p> <p><a href="https://hub.docker.com/r/siofoodsthafumb1971/">https://hub.docker.com/r/siofoodsthafumb1971/</a></p> <p><a href="https://hub.docker.com/r/siagranabul/">https://hub.docker.com/r/siagranabul/</a></p> <p><a href="https://hub.docker.com/r/tairwancuhoofp1977/">https://hub.docker.com/r/tairwancuhoofp1977/</a></p> <p><a href="https://hub.docker.com/r/apranasi/">https://hub.docker.com/r/apranasi/</a></p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Magnetic_dud"> /u/Magnetic_dud </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10mxq2j/flag_spammers_on_the_hub/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10mxq2j/flag_spammers_on_the_hub/">[comments]</a></span>t3_10mxq2j2023-01-27T22:13:13+00:002023-01-27T22:13:13+00:00Flag spammers on the hub?/u/StrikeAgainsthttps://www.reddit.com/user/StrikeAgainst<!-- SC_OFF --><div class="md"><p>Hey people, I've ran into a weird issue here.</p> <p>Weeks ago I've setup some docker containers in openmediavault 6 (Debian 11), which were running fine so far. Up until now the docker storage was located directly on my system SSD, now that I've finally got a pair of HDDs to build a RAID, I've moved the docker storage onto there. When I was firing my containers back up, I've encountered a few issues with the web UIs across my containers:</p> <p>- For both Pihole and SVNAdmin, the login is broken. When I enter the correct credentials, I get redirected back to the login page - without any error message.</p> <p>- Nextcloud won't work at all, returning me a 500 Internal Server Error.</p> <p>One issue is an exception, but multiple like that are very likely to be a pattern. Is there something I could have screwed up when moving the storage?</p> <p>Permissions seem alright to me, they haven't changed to the original storage (which I ofc have kept for issues like this).</p> <p>Any clue what could be causing this?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/StrikeAgainst"> /u/StrikeAgainst </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10n5juf/web_ui_for_most_containers_malfunctioning_after/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10n5juf/web_ui_for_most_containers_malfunctioning_after/">[comments]</a></span>t3_10n5juf2023-01-28T04:01:00+00:002023-01-28T04:01:00+00:00Web UI for most containers malfunctioning after moving docker storage/u/chasrmartinhttps://www.reddit.com/user/chasrmartin<!-- SC_OFF --><div class="md"><p>Is there anything that a Dockerfile can do that can’t be done with docker compose?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/chasrmartin"> /u/chasrmartin </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10n2u8y/dockerfile_vs_docker_compose/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10n2u8y/dockerfile_vs_docker_compose/">[comments]</a></span>t3_10n2u8y2023-01-28T01:49:41+00:002023-01-28T01:49:41+00:00Dockerfile vs docker compose/u/InFarAday2https://www.reddit.com/user/InFarAday2<!-- SC_OFF --><div class="md"><p>I've recently taken an interest in Docker both for personal projects & for work to upgrade my software architect skills.</p> <p>Currently we rent a VM with one of our partners which is kinda (very) expensive but they handle backup, support and everything for us. We're hosting a React.js web app on it and we have another VM that hosts the back-end (C#).</p> <p>As it happens we now need to put a license server on the first VM and we will soon have other web apps to host. We also have an Azure pipeline that automatically deploys updates when pushing to any branch release/*</p> <p>I've understood that Docker offers an easy way to port your runtime environment from test to production, which is neat. There also seems to be reduced overhead compared to a VM if you're not running it in a virtualized context (eg on a bare metal OS) which is not my case (dedicated are too expensive). I'm still confused by what docker might offer compared to having one Nginx "website" for each web app, especially considering Docker itself will run in the VM. + will I need one nginx instance per container?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/InFarAday2"> /u/InFarAday2 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10mvzxg/do_i_have_a_use_case_for_docker/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10mvzxg/do_i_have_a_use_case_for_docker/">[comments]</a></span>t3_10mvzxg2023-01-27T21:03:35+00:002023-01-27T21:03:35+00:00Do I have a use case for Docker?/u/dannyskylarkhttps://www.reddit.com/user/dannyskylark<!-- SC_OFF --><div class="md"><p>Hey, so I am running Ubuntu 20.04 and I created a dockerfile to containerize some python code, it's a pretty basic Dockerfile.</p> <p>I run: </p> <p><code>sudo docker build -t python_code .</code></p> <p>then I check to see if it exists by running: </p> <p><code>sudo docker images</code></p> <p>and I successfully see the image along side it's container ID</p> <p>Now when I run </p> <p><code>sudo docker exec -it <container id>/bin/bash</code></p> <p>I get the error saying <code>Docker Error: No such container: <container-id></code></p> <p>Anyone know why I keep getting this strange error?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/dannyskylark"> /u/dannyskylark </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10mlw6u/strange_docker_error_no_such_container_help/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10mlw6u/strange_docker_error_no_such_container_help/">[comments]</a></span>t3_10mlw6u2023-01-27T14:16:49+00:002023-01-27T14:16:49+00:00Strange Docker error: No such container. Help!/u/Pallerihttps://www.reddit.com/user/Palleri<!-- SC_OFF --><div class="md"><h1>Webgui for <a href="https://github.com/mag37/dockcheck">dockcheck</a> provided by <a href="https://github.com/mag37/dockcheck">Mag37@github</a></h1> <p>A script checking updates for docker images without the need of pulling - then having the option to auto-update.</p> <p>I made a webgui for this amazing script that shows if there is a new image to pull. <a href="https://github.com/Palleri/dockcheck-web">Dockcheck-web</a></p> <p>Still in development. This image use docker.sock, so use it with care and do not publish it on the internet.</p> <h3>Future ideas</h3> <ul> <li>Email notification on available images</li> <li>Update and pull new image on selected container via webgui</li> </ul> <p>All cred goes to <a href="https://github.com/mag37/dockcheck">Mag37@github</a> for this base script that made this webgui possible.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Palleri"> /u/Palleri </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m484z/webgui_for_docker_updates/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m484z/webgui_for_docker_updates/">[comments]</a></span>t3_10m484z2023-01-26T22:16:37+00:002023-01-26T22:16:37+00:00Webgui for docker updates/u/ze410thttps://www.reddit.com/user/ze410t<!-- SC_OFF --><div class="md"><p>Hi, so I only recently looked into Docker and it looks like just what I am looking for. I am planning on buying an NUC to use as a media server in the house that runs Prowlarr, Sonarr, Radarr and Qbittorrent. This device would then be capable of streaming to devices on the network. I was also planning on running other OS' or services like PiHole and Home Assistant from it. Would all this be possible using Docker? If so, where do I start?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/ze410t"> /u/ze410t </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lyi9o/docker_running_pihole_home_assistant_and_more/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lyi9o/docker_running_pihole_home_assistant_and_more/">[comments]</a></span>t3_10lyi9o2023-01-26T18:18:48+00:002023-01-26T18:18:48+00:00Docker running pihole, home assistant and more/u/vasquca1https://www.reddit.com/user/vasquca1<!-- SC_OFF --><div class="md"><p>Is it possible? I am struggling to get this CRI running.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/vasquca1"> /u/vasquca1 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m8me9/docker_on_mac_m2/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m8me9/docker_on_mac_m2/">[comments]</a></span>t3_10m8me92023-01-27T01:35:23+00:002023-01-27T01:35:23+00:00Docker on Mac M2/u/bayarea-devhttps://www.reddit.com/user/bayarea-dev<!-- SC_OFF --><div class="md"><p>I summarized a dead simple docker cheatsheet, in case it is useful to anyone if you need a reference for the commonly used commands.</p> <p><a href="https://sweworld.net/cheatsheets/docker/">https://sweworld.net/cheatsheets/docker/</a></p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/bayarea-dev"> /u/bayarea-dev </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lbvz2/a_simple_and_clean_docker_cheatsheet/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lbvz2/a_simple_and_clean_docker_cheatsheet/">[comments]</a></span>t3_10lbvz22023-01-25T22:34:33+00:002023-01-25T22:34:33+00:00A Simple And Clean Docker CheatSheet/u/ElectricalEinsteinhttps://www.reddit.com/user/ElectricalEinstein<!-- SC_OFF --><div class="md"><p>Setup: I currently have a working NGINX reverse proxy running on bare metal. I need to containerize it. </p> <p>I copied everything in the existing/etc/NGINX folder, used the official NGINX image from dockerhub & built a container. My web app is already in a running container. </p> <ul> <li>I stopped the current NGINX & started this new container. </li> <li>made sure that all the containers are on the same network </li> <li>Checked docker logs for my new NGINX container & it shows that it started, but nothing after that. </li> </ul> <p>I am getting a 502 when I try to load my web app . </p> <p>Not sure where/what to look at next.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/ElectricalEinstein"> /u/ElectricalEinstein </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m7u6e/help_containerizing_nginx/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m7u6e/help_containerizing_nginx/">[comments]</a></span>t3_10m7u6e2023-01-27T00:57:21+00:002023-01-27T00:57:21+00:00Help: Containerizing NGINX/u/EmeraldKing7https://www.reddit.com/user/EmeraldKing7<!-- SC_OFF --><div class="md"><p>I am running pihole in a docker container on the default bridge network and almost everything is running perfectly. However, I am quite annoyed that all the DNS requests pihole is handling are listed as coming from the docker host (perfectly expected, as all clients have the host as their DNS server but the host itself needs to forward all these requests to the container). I want to be able to see the different IPs of the clients using pihole in the logs so I am thinking I should move the pihole container to the default host or a macvlan network as to get it in the same subnet as the host and its peers. What would be the recommended way of achieving my goal?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/EmeraldKing7"> /u/EmeraldKing7 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m5di8/easiest_solution_to_have_container_see_ips_on_the/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m5di8/easiest_solution_to_have_container_see_ips_on_the/">[comments]</a></span>t3_10m5di82023-01-26T23:04:42+00:002023-01-26T23:04:42+00:00Easiest solution to have container see IPs on the same subnet as its host?/u/thankyoufatmemberhttps://www.reddit.com/user/thankyoufatmember<!-- SC_OFF --><div class="md"><p>Question 1)<br/> I just pulled Caddy as a Docker container on my server, and now I'm wondering what you think is the absolute easiest way to edit the files inside it would be. I've read the official documentation but am looking for other "easier" ways, maybe I'm old school or just lack knowledge, but I'm used to uploading or editing over FTP or SFTP since before.</p> <p>Question 2)<br/> If I edit let's say a logo inside a container, and then the container is updated, how can I add a rule to exclude my change so it doesn't get overwritten the next time I update the container, or maybe it won't work? Thinking specifically of Uptime Kuma where I want to replace their logo with my own (will still give them proper credit in the footer)</p> <p>Thank you very much in advance!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/thankyoufatmember"> /u/thankyoufatmember </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m3lff/beginner_questions_on_editing_files_within/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m3lff/beginner_questions_on_editing_files_within/">[comments]</a></span>t3_10m3lff2023-01-26T21:50:43+00:002023-01-26T21:50:43+00:00Beginner questions on editing files within containers/u/KalterBluthttps://www.reddit.com/user/KalterBlut<!-- SC_OFF --><div class="md"><p>Here's my issue: I built myself a home server on OpenMediaVault to run my torrents and use it as a media server. I installed qBittorrent through Portainer in a Docker container. All went well until I had to mess it up and try to change the webUI of qBittorrent. It doesn't accept the file or something and now I'm stuck with this error: "Unacceptable file type, only regular file is allowed.".</p> <p>Every fix I found for that doesn't work. The only one that seems to have a possibility of working is the one updating the qBittorrent.conf file in the container. I have been able to do that, but every time I restart the container (so that the app can pick up the config file again), it reverts the config file. I tried to save a new image via docker commit, load this image, but I'm still with the previous version of the file. I double checked that I was loading the newer image.</p> <p>EDIT: Alright nevermind, I finally found that when doing a docker commit it doesn't save the data on the image. Instead I changed in Portainer for the docker compose the folder in which the config data is to a system drive. I've lost my settings (and my torrents, I'll see if I can add them back quickly), but I didn't have to redo my container. Though I'm not sure it was that much different in the end.</p> <p>I don't know what I'm doing wrong, but it's not working at all and I'd like to avoid recreating the container from scratch. Any idea as to what I'm missing?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/KalterBlut"> /u/KalterBlut </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m3cdo/cant_save_current_state_of_a_specific_file/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m3cdo/cant_save_current_state_of_a_specific_file/">[comments]</a></span>t3_10m3cdo2023-01-26T21:40:29+00:002023-01-26T21:40:29+00:00can't save current state of a specific file/u/Devastater6194https://www.reddit.com/user/Devastater6194<!-- SC_OFF --><div class="md"><p>Hi All</p> <p>I'm trying to route one container to use another as it's network.</p> <p>I've got this working via "--network container:vpn" however whenever I recreate the vpn container, the other container(s) using it lose network. This makes sense but means I have to manually point them at the vpn container again.</p> <p>As well as that, the containers using the vpn all lose network if the vpn drops, even if it comes back they don't reconnect to the vpn unless they are restarted too.</p> <p>Basically, is this the correct/best way of doing this or is there a better way, preferably one that doesn't require amending multiple containers every time I update the vpn container?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Devastater6194"> /u/Devastater6194 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m231e/container_networking/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m231e/container_networking/">[comments]</a></span>t3_10m231e2023-01-26T20:48:48+00:002023-01-26T20:48:48+00:00Container Networking/u/sethicishttps://www.reddit.com/user/sethicis<!-- SC_OFF --><div class="md"><p><strong>Background</strong><br/> I've been using Docker for about a year now for my personal server projects, but recently I decided to setup a distributed node setup with a friend where we could deploy docker images to both of our servers to do some self hosting of VaultWarden.</p> <p>The idea was to use a GCP always free e2-micro instance as the manager for the setup, but have the worker nodes be on our own personal servers at home. I originally planned on using k3s for the setup, not sure if that a sin to mention here or not, but its resource usage, even with agent disabled was just WAY too high, somewhere around 600+ MBs on a vm that only has 900 MBs total.</p> <p>I opted to try Docker Swarm out and found that I could create a single manager system with our servers joined as worker nodes for roughly 50 MBs of memory usage; WAY better for our needs.</p> <p><strong>The Issue</strong></p> <p>While we were able to successfully get our home servers connected as worker nodes and deploy a test Nginx image to them. I can't for the life of me get Docker Swarm to load balance the requests. I'm sure this is just my Docker Swarm ignorance showing, but I assumed that if I just created a swarm that shared the same overlay network and had the necessary ports published for Nginx all traffic on the manager node would automatically get routed to the remote host worker nodes. However, I can't for the life of me get curl calls to the Nginx port on the manager node to reach the worker nodes.</p> <p>Here's the `docker-compose.yml` file I'm using to deploy the stack:</p> <pre><code>version: '3.9' services: test: image: ubuntu command: sleep infinity deploy: placement: constraints: - "node.role==manager" networks: - overlay web: image: nginx deploy: mode: global placement: constraints: - "node.role!=manager" restart_policy: condition: on-failure volumes: - /tmp:/test ports: - target: 80 published: 8080 protocol: tcp mode: host environment: - NGINX_HOST=<redacted> - NGINX_PORT=80 networks: - overlay networks: overlay: name: my-overlay external: true </code></pre> <p>Here's the `docker network inspect my-overlay`</p> <pre><code>[ { "Name": "my-overlay", "Id": "6wgvmspe8wm0f23us13tthk02", "Created": "2023-01-21T21:34:37.196357588Z", "Scope": "swarm", "Driver": "overlay", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "10.0.11.0/24", "Gateway": "10.0.11.1" } ] }, "Internal": false, "Attachable": true, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "e456fdef8325bcef52a914e6164e644ef319104d2e970ccddcec8ab3aeb259e1": { "Name": "nginx_test.1.f8h2hlx8cyb9cf5k9swad7hgj", "EndpointID": "370e9292cf72ee6349e55778b7ea264fc5b169b1471ddc8eef3258c42ff16f8d", "MacAddress": "02:42:0a:00:0b:1a", "IPv4Address": "10.0.11.26/24", "IPv6Address": "" }, "lb-my-overlay": { "Name": "my-overlay-endpoint", "EndpointID": "4460ca40c22a7df16d1936e7f17c2413741f91c53bbcc79df57eb0ac18b1b618", "MacAddress": "02:42:0a:00:0b:1b", "IPv4Address": "10.0.11.27/24", "IPv6Address": "" } }, "Options": { "com.docker.network.driver.overlay.vxlanid_list": "4107" }, "Labels": {}, "Peers": [ { "Name": "65893bbb1dba", "IP": "10.142.0.2" }, { "Name": "7e1eb31f5157", "IP": "192.168.30.117" } ] } ] </code></pre> <p>Any help / advice you all can provide a Docker Swarm newb like myself would be a huge help.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/sethicis"> /u/sethicis </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10m11n1/help_a_docker_swarm_newb_out/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10m11n1/help_a_docker_swarm_newb_out/">[comments]</a></span>t3_10m11n12023-01-26T20:04:44+00:002023-01-26T20:04:44+00:00Help a Docker Swarm Newb Out/u/THROW812u812491https://www.reddit.com/user/THROW812u812491  submitted by   <a href="https://www.reddit.com/user/THROW812u812491"> /u/THROW812u812491 </a> <br/> <span><a href="/r/learnjavascript/comments/10lv4lo/cannot_connect_to_mongodb_database/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lznff/cannot_connect_to_mongodb_database/">[comments]</a></span>t3_10lznff2023-01-26T19:06:36+00:002023-01-26T19:06:36+00:00Cannot connect to mongodb database/u/jaherron670https://www.reddit.com/user/jaherron670<!-- SC_OFF --><div class="md"><p>I have one container running on my server right now and I want to install another container using Compose. Will using Compose delete containers created without Compose?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/jaherron670"> /u/jaherron670 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lxsc5/does_compose_delete_existing_containers_that_were/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lxsc5/does_compose_delete_existing_containers_that_were/">[comments]</a></span>t3_10lxsc52023-01-26T17:48:49+00:002023-01-26T17:48:49+00:00Does Compose delete existing containers that were created normally?/u/Insommyahttps://www.reddit.com/user/Insommya<!-- SC_OFF --><div class="md"><p>When i try to access through my public IP from a device outside my network the Port Forwarding to port 80 leads to my router login page instead to my NPM Container on 80:80, i can access to any other port that forwards to any other container</p> <p>On LAN the Router Port Forwarding to port 80 works and points to my NPM Container</p> <p>I was wondering if i have to edit something in the Windows Host File</p> <ul> <li>The Router Port forward its pointing to my host IP instead of the Container IP</li> </ul> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Insommya"> /u/Insommya </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lwmo3/router_port_forwarding_works_on_wan_with_all/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lwmo3/router_port_forwarding_works_on_wan_with_all/">[comments]</a></span>t3_10lwmo32023-01-26T17:00:23+00:002023-01-26T17:00:23+00:00Router Port Forwarding works on WAN with all ports except port 80/u/jip100https://www.reddit.com/user/jip100<!-- SC_OFF --><div class="md"><p>Just launched as an open-source product, Dockwell is hoping to aid developers in their analysis of container metrics. Check out our website at <a href="https://Dockwell.tech">Dockwell.tech</a> and give the product a try!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/jip100"> /u/jip100 </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lvckb/introducing_dockwell_a_lightweight_nearzero/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lvckb/introducing_dockwell_a_lightweight_nearzero/">[comments]</a></span>t3_10lvckb2023-01-26T16:08:08+00:002023-01-26T16:08:08+00:00Introducing Dockwell, a lightweight, near-zero configuration, container metrics visualizer./u/netpumberhttps://www.reddit.com/user/netpumber<!-- SC_OFF --><div class="md"><p>Hello everybody,</p> <p>I've created a Docker image that runs nginx as reverse proxy and also I installed the certbot for the SSL certificates.</p> <pre><code>FROM nginx:alpine # Volumes to passed # COPY ./assets/sites-enabled /etc/nginx/conf.d # Install certbot RUN apk add certbot certbot-nginx # Copy the Diffie–Hellman key COPY ./assets/certs/dhparam.pem /etc/ssl/certs/dhparam.pem RUN mkdir /etc/nginx/snippets COPY ./assets/snippets/ssl-params.conf /etc/nginx/snippets </code></pre> <p>Here is the corresponding part of the <code>docker-compose.yml</code></p> <pre><code>version: "3.3" services: reverse_proxy: ports: - "80:80" - "443:443" volumes: - "/home/user/docker-volumes/reverse_proxy/sites-enabled:/etc/nginx/conf.d" - "/home/user/docker-volumes/reverse_proxy/letsencrypt:/etc/letsencrypt" - "/home/user/docker-volumes/reverse_proxy/cron-jobs:/etc/periodic/weekly" container_name: reverse_proxy image: reverse_proxy networks: cloud_net: ipv4_address: 10.0.0.2 </code></pre> <p>The thing is that although the cron_jobs script is executable it never run and the certificate was ready to expire. When I connected to the docker and run this command manually <code>run-parts /etc/periodic/weekly</code> every thing worked properly and the SSL Certificate updated..</p> <p>It seems that although the cron daemon exists it is not initialized.</p> <pre><code>/ # which crond /usr/sbin/crond / # ps -a PID USER TIME COMMAND 1 root 0:00 nginx: master process nginx -g daemon off; 63 nginx 0:00 nginx: worker process 64 nginx 0:00 nginx: worker process 92 root 0:00 /bin/sh 99 root 0:00 ps -a </code></pre> <p>How can I make it run side by side with the nginx?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/netpumber"> /u/netpumber </a> <br/> <span><a href="https://www.reddit.com/r/docker/comments/10lukqi/question_how_am_i_going_to_always_execute_crond/">[link]</a></span>   <span><a href="https://www.reddit.com/r/docker/comments/10lukqi/question_how_am_i_going_to_always_execute_crond/">[comments]</a></span>t3_10lukqi2023-01-26T15:35:49+00:002023-01-26T15:35:49+00:00[Question] How am I going to always execute crond inside an image that runs nginx?