Docker

1453 readers
5 users here now

founded 3 years ago
MODERATORS
1
 
 

Hey guys!

I want to take the next step in selfhosting and it seems that docker is something I need for my projects.

I am running a Raspberry Pi 5 (16GB) with pihole+unbound and I want to install NextCloud as well. The problem is: NextCloud and PiHole both want to use port 80, which conflicts.

So, I probably need to remap the ports with docker. I already saw some videos and read some instructions, but so far I had no success setting it up. It's pretty confusing, with no docker-experience.

How do you handle this issue? Maybe I just need a little push in the right direction.

~sp3ctre

2
 
 

hey folks, I hate to ask but I'm driving myself crazy. Does anyone know why an Apache2 server would refuse to redirect to docker ports? No matter what I set Proxy/ProxyReverse to or what ensite/dissite, it always goes to the same place.

Debian 13, Docker, bare metal NextCloud install on the system as well.

Any insights are appreciated. Thank you all so much!

3
 
 

cross-posted from: https://feddit.org/post/30198502

System:

Debian 13 KDE (actually MX Linux, but doesn't seem to matter)  
Wayland (xwayland installed as well)  
Docker 29.5.2

Dockerfile:

FROM debian:trixie

ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

# Set locale
RUN apt-get update && apt-get install -y --no-install-recommends \
        locales && \
    apt-get clean && \
    sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
    locale-gen

# Install Wayland-specific packages
RUN apt-get update && apt-get install -y --no-install-recommends \
        dbus \
        libwayland-client0 \
        libwayland-egl1 && \
    apt-get clean

# Install X-specific packages
RUN apt-get update && apt-get install -y --no-install-recommends \
        dbus-x11 && \
    apt-get clean

# Add contrib, default is only main
RUN sed -i 's/^Components:.*/Components: main contrib/g' /etc/apt/sources.list.d/debian.sources

# Add 32-bit arch for Steam libraries
RUN dpkg --add-architecture i386

# Install Steam
RUN apt-get update && apt-get install -y --no-install-recommends \
        steam-installer \
        pciutils && \
    apt-get clean

# Additional
# TODO: What is really needed?
RUN apt-get update && apt-get install -y --no-install-recommends \
        vulkan-tools \
        mesa-utils \
        x11-xserver-utils \
        libvulkan1 \
        mesa-vulkan-drivers && \
    apt-get clean

# TODO: Does `-storebeta` even work?
# https://developer.valvesoftware.com/wiki/Command_line_options_(Steam)
CMD ["/usr/games/steam", "-storebeta"]

To run the container:

xhost +
sudo docker run -it --name steam \
    -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
    -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
    -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
    -e DISPLAY=$DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    --privileged steam:trixie

(The --privileged part is only temporary until I found out which capabilities are actually needed. Please don't run your containers with --privileged.)

I get the GUI dialogs to download Steam just fine, so at least some display forwarding is working:

The installation works fine, but when starting Steam it seems like it's not able to find Vulkan devices and then doesn't open any Steam window. (The container is not stopping and I'm seeing repeated ./steamwebhelper output after this.)

[...]
Running query: 1 - GpuTopology
CVulkanTopology: failed create vulkan instance: -9
CVulkanTopology: failed to create vulkan instanceFailed to query vulkan gpu topology

Failed to query vulkan gpu topology
Response: 
Exit code: -2
[...]
Vulkan missing requested extension 'VK_KHR_surface'.
Vulkan missing requested extension 'VK_KHR_xlib_surface'.
BInit - Unable to initialize Vulkan!
[...]

However, Vulkan is clearly working fine in the container, as this commands displays the cube rendering just fine:

$ sudo docker exec -it steam vkcube
Selected WSI platform: xcb
Selected GPU 0: AMD Radeon RX 550 / 550 Series (RADV POLARIS12), type: DiscreteGpu

(I've also tried it on another (pure) Debian machine with a 2080Ti, but I've got the same issue.)

I've created other GUI containers in the past (Firefox for example) and didn't have these problems.

Does anybody have an idea and can point me in the right direction?

4
 
 

Full disclosure: I'm very new and very dumb. So. Bear that in mind.

I'm running Docker on Ubuntu Server 24.04 LTS. I installed it according to the official directions provided by Docker. The container example I'll refer to here is Beets, but same happens on Calibre Web Automated and a couple other containers I tried.

Basically, from within the container I can't ping google. This:

docker exec -it beets ping -c 3 google.com

returns:

PING google.com (142.250.113.138): 56 data bytes google.com ping statistics: 3 packets transmitted, 0 packets received, 100% packet loss

So, in Beets case, it can't access musicbrainz to do.. well, anything it's built to do, because it (and any other container I run) doesn't seem to be able to access the internet? Idk.

I've tried a whole bunch of stuff at this point (not really knowing what any of it means, mind you) and nothing has worked. I've checked /etc/resolved.conf, which just lists 127.0.0.53, which is apparently some sort of systemd DNS cache? Ngl, I don't really know what that means, but a potential solution I read was to override it by editing /etc/docker/daemon.json to include something like dns: [8.8.4.4, 8.8.8.8] (I don't recall the exact syntax, sorry). Anyway, that was even worse, because running the ping from inside the container then didn't resolve an IP for google at all and just said "bad address". I tried making a user-defined bridge, which output the exact same as above: 100% packet loss. I tried rebuilding the iptables, nothing. Directing containers to a network in the compose yml, restarting containers, restarting docker, rebooting. Idk.

Only thing that seems to work is adding network_mode: "host" to the container's compose yml, which... I mean, if that's the solution that works, that's what I'll do. But I'm wondering what exactly is going wrong otherwise, and if I can fix it.

Any help greatly appreciated.

5
6
7
 
 

Compiled my Docker notes focusing on the stuff tutorials usually skip:

  • Compose profiles for dev-only services
  • Healthchecks with depends_on conditions (so services actually wait for each other)
  • Override files for different environments
  • .env auto-loading
  • Cleanup commands to save disk

Plus the daily commands organized by frequency. Nothing revolutionary, just a clean reference.

8
9
 
 

Update: I've gone back to standard docker-compose. It's actually easier for me than Docker Desktop. Thanks all for the helpful suggestions.

Due to persistent brain fog lately, I opted for Docker Desktop on this machine. I chose the image from doc75/wallabag:prev-prod and ran it. But I can't access it from the frontend.

I'd rather get it going through Docker Desktop rather than the usual docker compose via terminal. Can anyone help?

Logs, as requested:

 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.  



 Trying to install assets as relative symbolic links.



***
------------------------ ------------------ 

      Bundle                   Method / Error    


***
------------------------ ------------------ 

  ✔   NelmioApiDocBundle       relative symlink  

  ✔   CraueConfigBundle        relative symlink  

  ✔   BabDevPagerfantaBundle   relative symlink  

  ✔   FOSJsRoutingBundle       relative symlink  


***
------------------------ ------------------ 


 [OK] All assets were successfully installed.                                   


wallabag is ready!

::1 - - [26/Feb/2026:20:23:52 +0000] "GET /api/info HTTP/1.1" 200 81 "-" "healthcheck"

Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.

Package scheb/2fa-qr-code is abandoned, you should avoid using it. No replacement was suggested.

Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.

Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.

Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.

Package wallabag/php-mobi is abandoned, you should avoid using it. No replacement was suggested.

Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.

Package symfony/web-server-bundle is abandoned, you should avoid using it. No replacement was suggested.

Generating optimized autoload files

101 packages you are using are looking for funding.

Use the `composer fund` command to find out more!

> Incenteev\ParameterHandler\ScriptHandler::buildParameters

> bin/console cache:clear --no-warmup

> bin/console assets:install web --symlink --relative
10
11
12
13
14
15
16
17
18
19
20
21
 
 

I have set up my site.conf as a site.conf.template file in /etc/nginx/templates/

It has successfully been copied into etc/nginx/conf.d before, but after making some changes to the template and rebuilding the container, it is not copying again. There are no errors in the docker log for the nginx container, in fact it is running (without the sites config).

I have tried changing the local copy of conf.d to 775, but other than that I can't think of what would be stopping it from copying or triggering. Or where to look for error logs. 🙏

22
 
 

Hello I try install Ghost CMS with docker compose in my server, a minipc I get the compose from docker-hub. I don't change nothing, only for try. Ghost don't launch. The log file error is in the image.

I looked for the error and see that it is something common, but i don't see the solution. I try others user compose file, same result. Desesperate, I asked the IA for compose file, and I see other related error.

In Mastodon, a user suggest me create a config file in the folder, and launch the compose. Same result.

Any idea?? Excuse my english

23
1
submitted 10 months ago* (last edited 10 months ago) by appleberry@aussie.zone to c/docker@programming.dev
 
 

I'm new to docker.

I'm trying to run the nginx/alpine container and getting this error:

2025/08/10 01:09:55 [emerg] 1#1: unknown "flask_port" variable nginx: [emerg] unknown "flask_port" variable

Strangely, there is no flask_port reference in my codebase (having grepped for it in ./*). There is FLASK_PORT, but it seems unlikely that that the case for the missing variable would get changed before outputting to the log file, right?!

I have rebuilt the container many times and cleared the cache. But the message persists.

There is a reference to FLASK_PORT in the .conf file but changing it doesn't change the error message, so I assume it isn't coming from there.

No reference to it in docker-compose.yml or Dockerfile.

Any tips on how to troubleshoot something like this? 🙏

24
 
 

I run a docker container and it has some outdated bits which I forked and updated. The changes need testing and no one else seems to wanna do it. For some odd reason I'm nervous about pointing the image at my repo and building from that. Am I Being Stupid? It's not like if it fails I can't just recreate the image. None of the databases are gonna be affected. So what am I anxious about?

25
 
 

I have installed Nginx Proxy Manager on my Synology NAS using the Container Manager, but I haven’t set up SSL encryption. I already have a Let's Encrypt certificate via Control Panel > Security > Certificate. However, I want to use Nginx Proxy Manager as a reverse proxy instead of Web Station to forward my Docker instances from http://dockerinstance:8000/ to https://dockerinstance:8001/. Is there a guide for beginners?

thanks a lot!

view more: next ›