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

Add Docker Image and Corresponding Github Action #113

Merged
merged 1 commit into from
Mar 12, 2023
Merged

Add Docker Image and Corresponding Github Action #113

merged 1 commit into from
Mar 12, 2023

Conversation

varbhat
Copy link
Contributor

@varbhat varbhat commented Mar 11, 2023

@anacrolix ,

So, I have packed dms as Docker Image(Based on alpine linux). Also, added corresponding Github action which builds docker image and pushes it to ghcr.io .I have been using this for long time and it would be helpful if you can merge this

@anacrolix anacrolix merged commit c6ea09b into anacrolix:master Mar 12, 2023
@irsl
Copy link
Contributor

irsl commented Mar 13, 2023

Hey varbhat! Thanks for contributing the image workflow, this is really nice.
I noticed a bug; at transcoding or the dynamic streams feature, the server goes down due to nil pointer dereference:

2023/03/13 19:32:05 http: panic serving 10.6.8.186:32886: runtime error: invalid memory address or nil pointer dereference
goroutine 9951 [running]:
net/http.(*conn).serve.func1()
        net/http/server.go:1854 +0xbf
panic({0x562be154db80, 0x562be1853d10})
        runtime/panic.go:890 +0x263
github.com/anacrolix/dms/dlna/dms.(*Server).serveDLNATranscode.func2({0xc0000f5ba8, 0x18})
        github.com/anacrolix/dms/dlna/dms/dms.go:446 +0x3f

This is because golang is unable to look up the default user 1000 inside the container. Would you mind sending a fix?

@varbhat
Copy link
Contributor Author

varbhat commented Mar 13, 2023

@irsl ,
I will do it. But, before that, can you try with -u flag?

docker run -u 1000:1000 ? Does this fix your problem or should i add default user 1000 in alpine container?

@irsl
Copy link
Contributor

irsl commented Mar 13, 2023

-u nobody:nogroup does fix the problem since that user is present in /etc/passwd.

irsl added a commit to irsl/dms that referenced this pull request Apr 1, 2023
This change also addresses the issue raised in anacrolix#113,
when user lookup fails in a docker container, logging will be silently
turned off (instead of panicing).
Tested with the following dynamic stream:

"Command": "bash -c 'echo stdout; >&2 echo stderr'"

Some earlier formatting mistakes (of mine) should also be fixed in README.rst.
irsl added a commit to irsl/dms that referenced this pull request Apr 2, 2023
This change also addresses the issue raised in anacrolix#113,
when user lookup fails in a docker container, logging will be silently
turned off (instead of panicing).
Tested with the following dynamic stream:

"Command": "bash -c 'echo stdout; >&2 echo stderr'"

Some earlier formatting mistakes (of mine) should also be fixed in README.rst.
anacrolix pushed a commit that referenced this pull request Apr 3, 2023
…117)

This change also addresses the issue raised in #113,
when user lookup fails in a docker container, logging will be silently
turned off (instead of panicing).
Tested with the following dynamic stream:

"Command": "bash -c 'echo stdout; >&2 echo stderr'"

Some earlier formatting mistakes (of mine) should also be fixed in README.rst.
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

Successfully merging this pull request may close these issues.

3 participants