Portainer: Install bolkedebruin/rdpgw

Hello everyone,
I would like to install rdpgw GitHub - bolkedebruin/rdpgw: Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes.
Unfortunately, I can’t get it to work with the docker-compose.yml that I load into Portainer. No matter what I try, I get countless error messages.

Does anyone perhaps have a docker configuration for Portainer for rdpgw?

That would be really great!

Thanks.

Never heard of the app, I doubt you will find a working template here.

So rather share what you got: compose and errors.

There are compose files in the dev/docker subdirectory of the repo, like this one:

yes,i know this file.
It’s now working

Deployment error
Failed to deploy a stack: time="2024-10-20T14:07:55Z" level=warning msg="The \"PWD\" variable is not set. Defaulting to a blank string." time="2024-10-20T14:07:55Z" level=warning msg="The \"PWD\" variable is not set. Defaulting to a blank string." time="2024-10-20T14:07:55Z" level=warning msg="/data/compose/2/v1/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion" failed to solve: failed to read dockerfile: open /var/snap/docker/common/var-lib-docker/tmp/buildkit-mount840726655/Dockerfile: no such file or directory 

Interesting. My first though was “they must have a .env file in the Git Repo that provides the variable value”, but it’s not the case.

Replace all ${PWD} occurrences with . in the compose file to store the data relative to the location of the compose file. Of course, you can specify absolute paths as well. As an alternative you could use a named volume instead.

PWD exists on linux, but not in the Portainer context. Using a dot would probably not help. If you want to use Portainer for creating containers and not just browsing (which I would recommend) then you have to do things differently. The Portainer way. Like using absolute path to the config files on the host or using configs which you can create in Portainer and then mount it as a volume. but I’m not a Portainer user so I can’t tell you the exact solution using a Portainer GUI, but I’m sure you can find it in the Portainer documentation or in a Portainer forum.

By the way the compose file also tries to define a json file as a volume which is not possible. That is why you need a config definition, not a volume.

i checked this, but it’s also not working :frowning:

Failed to deploy a stack: failed to solve: failed to read dockerfile: open /var/snap/docker/common/var-lib-docker/tmp/buildkit-mount952676191/Dockerfile: no such file or directory 

do you know a portainer forum or a communuity? i don’t find some.

So absolute paths it is then!

Note: you need to make sure Portainer actually knows about the absolute path you want to use. Lets assume all your volumes are located under /opt/docker/data, then you would need to map this path into the container at the same path.

I don’t use Portainer either, but I know that when Portainer deploys a compose project (called stack in Portainer), the Portainer conatiner must be able to access the path using the same path, otherwise the deployment will fail due to unknown paths.

I second @rimelek’s view about using Portainer to only view thing. Especially beginners won’t understand why voluem mappings won’t work, even though they exist on the host (but haven’t been mapped to the Portainer container).

I searched for “Portainer Forum” and found this

https://docs.portainer.io/#getting-support

I have now installed a new Debian server.
Installed Docker following the instructions from the Docker community and loaded the original file.

Unfortunately, it’s not working either.

WARN[0000] /docker-compose/rdpgw/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 13/13
 ✔ xrdp Pulled                                                            66.0s
   ✔ 952b15bbc7fb Pull complete                                            3.0s
   ✔ d09c90d58a8e Pull complete                                           63.6s
   ✔ 972b4726f63a Pull complete                                           63.9s
   ✔ 513713feca99 Pull complete                                           64.0s
   ✔ 56450129bf69 Pull complete                                           64.1s
   ✔ db8a6553e518 Pull complete                                           64.3s
   ✔ 2c177eff1635 Pull complete                                           64.4s
 ✔ keycloak Pulled                                                        24.5s
   ✔ 55360c0b72d6 Pull complete                                            3.4s
   ✔ 286aff21b23c Pull complete                                           16.3s
   ✔ 0629cb44ff17 Pull complete                                           22.1s
   ✔ 6825ffc3cd77 Pull complete                                           22.2s
[+] Building 0.4s (1/1) FINISHED                                 docker:default
 => [rdpgw internal] load build definition from Dockerfile                 0.2s
 => => transferring dockerfile: 2B                                         0.0s
failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
root@DWVERDOCKER02:/docker-compose/rdpgw#

pwd as .


root@DWVERDOCKER02:/docker-compose/rdpgw# docker compose up -d
service "keycloak" refers to undefined volume $ ./realm-export.json: invalid compose project
root@DWVERDOCKER02:/docker-compose/rdpgw#