I have been trying to get those two install-dvls scripts to work in docker, initially I was using Ubuntu official container, but I only tried the sh script and could not get past this error:
root@1d11918bec9a:/working# ./install-dvls.sh
/usr/bin/env: 'bash\r': No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang linesAssumed it was an issue with the ubuntu image, so I switched to a Debian image, but with the sh script I ran into the exact same error??? FYI I did have to manually install several packages initially such as Sudo, pwsh etc
I think decided to try the ps1 using pwsh package, it fired off and i went through the interactive prompts then i think it errored around ln 282 of the ps1:
[20241017210813] Creating user (dvls), group (dvls), and directory (/opt/devolutions/dvls)
useradd: user 'dvls' already exists
groupadd: group 'dvls' already exists
usermod: user '' does not exist
Write-Error: [20241017210813] User, 'dvls' and '', are not members of the group, 'dvls'Should mention, this was the 2nd run of the PS1. Hopefully, you gathered that already going by the "Already Exists" lines.
Granted I have not tried on an ubuntu VM yet but in theory this should work in docker if the requirements are met??
Any ideas
JK
Devolutions Force Member (and Long time Devolutions Fan)
I seem to have gotten past the ps1 error, seems it was not calling the current user correctly at least with pwsh on linux...
I changed ln 52 too:
'CurrentUser' = $(whoami)And i managed to pass my first error but now I've hit another snag lol, it's not downloading the zip file to extract to /opt/devolutions/dvls/
Did you say these scripts were confirmed working on Ubuntu VM?? May try on a VM next although I can't. see why running on the docker Ubuntu / Debian container would not work (Although I realise It requires the extra requirements from the missing vm version default packages)
Anyway, if you find a fix let me know as its more than likely to be faster than myself.
JK
Devolutions Force Member (and Long time Devolutions Fan)
Hi John!
Thank you for trying out the script. As you probably quickly realized, most Docker image won't work for this as it is missing bash, systemd, and potentially other prerequisites (such as logname generally not working due to how Docker users work). I'll update our documentation to reflect that. For now, you will need to use a full install of Ubuntu (a VM should work fine, and what we tested on). I am working on a Docker image, but it is not ready yet.
If you could try this on an Ubuntu 22.04 install, that would be great, and let me know if you encounter any bugs during that. Once again, thank you for trying this out!
-Adam
Adam Listek
Don't forget docker on WSL2 now has systemd option, plus bash is in the official docker container, I will be trying it on a vm next though but my wish is still do containerise this, I'll keep trying.. As I mentioned it's still Ubuntu just doesn't have many of the preinstalled packages as the non minamilist versions. I didn't realise logname was actually a package, I ended up using a built in function, logname is yet another requirement lol, also like I previously mentioned I think it may come down to compiling a package requirements list for docker deployment.
I mean mssql runs fine in docker so surely dvls should with some work right?
JK
Devolutions Force Member (and Long time Devolutions Fan)
Hi John,
I appreciate the notes! I haven't tested it on WSL2 as an option, but I'm certainly not opposed to making it work there as well. As logname is built-in to the full Ubuntu, it came along with that prerequisite, but you are right that there are multiple requirements and we should be more explicit. I'll work on updating the documentation (full documentation is also coming, more than just the GitHub readme).
Not saying it can't or won't work in there, we just haven't tested it yet. I am actively working on making both a single-image Dockerfile and a multi-container docker-compose configuration. Yes, it can work in Docker, I do have a test version of a single-image Dockerfile, but needs refinement.
Thanks for testing!
-Adam
Adam Listek
No problem, I know youve probably got your hands full already just getting a Linux build released. So I'll try the vm next while I either wait for more docs or work it out during my play time lol.
I do think that getting dvls to run on docker plus eventually kubernettes would be a winner for you guys though, I'm sure mid to large enterprises would buy it as a preferred deployment option on premise and cloud, after all it would cost less to run compute wise.
Just had thought, out of interest what does DPH business run on? Is it containerised? Talking about this topic I now wonder, wouldn't we have had a Linux dvls build by now if dph was containerised as the 2 products are very similar aren't they dph & dvls? Unless it's on windows based containers, seeing as devolutions apps are prodomanently .net?
JK
Devolutions Force Member (and Long time Devolutions Fan)
Hi John,
I appreciate the notes! I haven't tested it on WSL2 as an option, but I'm certainly not opposed to making it work there as well. As logname is built-in to the full Ubuntu, it came along with that prerequisite, but you are right that there are multiple requirements and we should be more explicit. I'll work on updating the documentation (full documentation is also coming, more than just the GitHub readme).
Not saying it can't or won't work in there, we just haven't tested it yet. I am actively working on making both a single-image Dockerfile and a multi-container docker-compose configuration. Yes, it can work in Docker, I do have a test version of a single-image Dockerfile, but needs refinement.
Now a docker compose file I would love to get my hands on, especially as from my point of view I'm trying to reverse engineer packages every run, could you commit it to the script-library repo pls when you have something. You would be my best friend then lol.
Thanks for testing!
-Adam
JK
Devolutions Force Member (and Long time Devolutions Fan)
I'll add the Docker build files once everything is working correctly in the ScriptLibrary repo. We are also interested in having it run on Kubernetes. I can't speak to the infrastructure for Hub, as it's not my area, but we use various methods and technologies to make everything work!
I'm hoping to make solid progress on the Docker components by the end of next week, but that depends very much on the time I can devote to it. I'll add that as soon as I can, though!
-Adam
Adam Listek
I gave this a go on an Ubuntu 2204 vm today, initially I saw the same errors I was seeing in docker, then I noticed my forked repo had updates which I synced then retried on the vm. First run it got a lot further than I've seen so far but failed towards the end the script, seemed it couldn't open appsettings.json. So, I retried this time as root, this worked, perhaps there is still a slight bug to work out around 450 ish I think, as my current user didn't seem to have the correct permissions on /opt/devolutions/dvls/.
I have the webui now working, but how is the authentication handled as I can't seem to login with any user??
I found it dvls-admin dvls-admin, found with trusted azure data studio
But appreciate the time you've put in on this its much appreciated.
JK
Devolutions Force Member (and Long time Devolutions Fan)
Hi John,
Sorry for the delayed response! I'll take a look at the check for appsettings.json, that check is just there to make sure the files got extracted correctly and permissions assigned. By default, we use logname to find the current user (though I'll see if there are some alternatives to this, in case it's not available), and add that user to the dvls group. Once added, we use the sg command to reload the current running users groups (i.e. the current user), so that they can access the /opt/devolutions/dvls location. If the sg command didn't reload your group membership in dvls, or permissions of 660 did not set right to that file, that might be why the appsettings.json was failing.
Just to double-check, what shell are you trying to execute this in? And, can you see if your current user is in the dvls group after running the script?
You bring up a good point about the default user, it's mentioned in the confirmation what the username and password will be, but that really should show in a message at the end, I'll update that. Also, I will make notes in the documentation that you should change that as well, the default user is just that, a default.
Once again, thank you for testing this and all your help!
-Adam
Adam Listek
I normally just use /bin/bash shell, but so far logname runs but it returns no login name on WSL??

MY BAD I discovered install-dvls.sh was saved in CRLF not LF which caused the line break errors i was seeing. saved in LF and it ran, still had to use & whoami rather than & logname..
Failed still on the permissions, current user wasnt added to DVLS group??

seems SG hadn't worked,

manual SG,

JK
Devolutions Force Member (and Long time Devolutions Fan)