I’m trying to use the Docker image to run PSU contained and wanting to test it out. The only experience I have with PSU related items is from V2 of PowerShell Universal Dashboard. I have zero experience with Docker.
I tried to follow this guide:
I have this Dockerfile:
FROM ironmansoftware/universal:latest
LABEL description=“Universal - The ultimate platform for building web-based IT Tools”
EXPOSE 5000
VOLUME [“/home/data”]
ENV Data__RepositoryPath /home/data/Repository
ENV Data__ConnectionString /home/data/database.db
ENV UniversalDashboard__AssetsFolder /home/data/UniversalDashboard
ENV Logging__Path /home/data/logs/log.txt
ENTRYPOINT [“./Universal/Universal.Server”]
I build the new (?) image like this:
docker build . --tag=universal-persistent-personal --platform linux/amd64
I then try to start this new image “universal-persistent-personal” from Docker Desktop but the log shows me this fatal error:
[17:03:10 FTL] Fatal error starting PowerShell Universal.
2023-03-04 18:03:10 System.IO.IOException: Function not implemented
2023-03-04 18:03:10 at System.IO.FileSystemWatcher.StartRaisingEvents()
Etc…
Trying to access the image via a browser (http://localhost:5000/) does not work:
Access to localhost was denied
You don’t have authorisation to view this page.
HTTP ERROR 403
I go t the option “–platform linux/amd64” to build an image from some google search on this error as it seems that the building issues I faced are related to the M1 chip. Maybe this is not right, I have no clue tbh.
I tried to run the default image from Ironman Soft itself and had this in the logs:
[17:33:29 FTL] Fatal error starting PowerShell Universal.
2023-03-04 18:33:30 System.IO.IOException: Function not implemented
2023-03-04 18:33:30 at System.IO.FileSystemWatcher.StartRaisingEvents()
Etc…
I got that image from this command:
docker pull ironmansoftware/universal
Seems like this Powershell Universal Docker image will not run for me but I cannot see what I could do to mitigate this? The only thing I can think of is that the server/host needs to be Windows for this to work but this goes against what I thought I knew about Docker, but I could be wrong of course.
When I try the basics, as decribed in the article about Docker and Powershell Universal:
docker pull ironmansoftware/universal
docker run --name ‘PSU’ -it -p 5000:5000 ironmansoftware/universal
I get this error in the console:
WARNING: The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5000 → 0.0.0.0:0: listen tcp 0.0.0.0:5000: bind: address already in use.
ERRO[0000] error waiting for container: context canceled
Trying to access localhost on port 5000 is not working, just like the tries from Docker Desktop.
Trying another port, as port 5000 seems to be occupied atm:
docker run --name ‘PSU’ -it -p 5001:5001 ironmansoftware/universal
I get this output in the console:
[17:51:35 FTL] Fatal error starting PowerShell Universal.
System.IO.IOException: Function not implemented
at System.IO.FileSystemWatcher.StartRaisingEvents()
So whatever I try, I cannot get this to run as expected.
Any ideas what is wrong or what I must do to get this working?
Product: PowerShell Universal
Version: latest from docker
Docker Desktop
Engine: 20.10.23
Compose: v2.15.1
Credential Helper: v0.7.0
Kubernetes: v1.25.4
MacOS Ventura 13.2.1
Chip Apple M1 Max