Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant download/run this container #4

Closed
pveiga90 opened this issue Apr 1, 2021 · 8 comments
Closed

Cant download/run this container #4

pveiga90 opened this issue Apr 1, 2021 · 8 comments

Comments

@pveiga90
Copy link

pveiga90 commented Apr 1, 2021

Hey mate, tryin to run your container from docker using the command:

docker run -d
--name=lapswebui
-e LDAP__Server=ldap.example.com
-e LDAP__Port=389
-e LDAP__UseSSL=false
-e LDAP__SearchBase=DC=example,DC=com
-p 8080:8080
--restart unless-stopped
docker.pkg.github.com/seji64/laps-webui/laps-webui

I changes the variables for my environment, but i keep getting access denied, even after login in to docker by running the comand "docker login"...

I also tried pulling the image first, but i always get this error:

"Error response from daemon: unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."

Im kinda new to docker environment, so maybe im doing something wrong?

@Seji64
Copy link
Owner

Seji64 commented Apr 2, 2021

Hi,

no you did nothing wrong.

It looks like you need a registration for the Github Package Registry (see here ). I didn't know that myself - so thanks for the hint :-)

I have now published the image on the Github container repository as well. So you should now be able to use the image via ghcr.io/seji64/laps-webui:latest.

@pveiga90
Copy link
Author

pveiga90 commented Apr 3, 2021

Thanks for the feedback, i now manage to create the container, but being unable to login.

"warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx} may be persisted to storage in unencrypted form.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app
fail: LAPS_WebUI.Services.LDAPService[0]
Unable to load shared library 'ldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libldap-2.4.so.2: cannot open shared object file: No such file or directory
But I'm unable to login, this are the logs:
"

Seems like its missing some dependencies

I managed to run another version from "https://hub.docker.com/r/seji/laps-webui" successfully, but seems like an outdated version

@Seji64
Copy link
Owner

Seji64 commented Apr 3, 2021

I'm a bit surprised, because we use the same Dockerfile at my work and it works there. I can take a closer look after Easter.

@Seji64
Copy link
Owner

Seji64 commented Apr 7, 2021

Hi, i have looked at the Container we Running at work. The dockerfile is the same. The warnings you mentioned are also printed. They can be igonored. I currently don‘t know why the ldap library is missing here and not at the Image at work.

@pveiga90
Copy link
Author

pveiga90 commented Apr 7, 2021

Just tried downloading the image and recreating the container from scratch, still the same outcome.
Is it possible that the shared library is only downloaded when logging in for the first time? i ask becaus i run thi inside a VM with 2 network adapters, one NAT and another bridge, in order to have internet access i need to disable the bridge adapter, which leaves me with only a command line interface. Only after re enabling the bridged adapter i can have access to the container webpage.

Still, it is strange that i can run fine the container published on DockerHub

@aoliynik
Copy link

Probably related to this issue:
dotnet/runtime#68365

Adding
RUN apt-get update
&& apt-get install -y --no-install-recommends
libldap-2.4-2
&& rm -rf /var/lib/apt/lists/*

should help to fix ldap.so issue

Seji64 added a commit that referenced this issue Apr 22, 2021
Workaround for #4
@Seji64
Copy link
Owner

Seji64 commented Apr 22, 2021

thx @aoliynik !

@pveiga90 could you pull the new image and it try it again?

@pveiga90
Copy link
Author

Hey @Seji64, seems to be working, the error logs are gone :)

I just have 1 small problem where searching one specific machine i get the message "No permission to retrieve LAPS Password", which is incorrect and I can check the password correctly via AD ou the Laps UI application. But this might be a minor bug, since I only got this error on this specific machine, which was the first one i searched for, and I noticed the password was expired... So might be something on my end and futher testing is needed.

One minor repair also, on the README.md, the port should read "-p 8080:80 " instead of "-p 8080:8080 ", since from my testing this is the port the webpage listens to.

Other than that, it is working great!

Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants