mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-27 00:25:53 +03:00
[GH-ISSUE #308] Dockerfile #126
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hongkongkiwi on GitHub (Feb 24, 2020).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/308
I wanted to use this in a Docker, so I've created a dockerfile here you can include into the repo if you like. I just put it in the base repo, I suppose it would be good to create some per platform but I'm not so familiar with that. This can be used to build a RPI version by running it on a pi itself :-)
Note that I have to do a sed to update 127.0.0.1 into 0.0.0.0, this is because we want the docker image listening to a public address, outside of the container, we can simply map this to localhost for safety. It would be great to have a option in the config or command line to set this, specifically it's in this file.j
Apart from this, I would like to have a variable to change "localhost" to something else.
UPDATE
After building the image with
docker build . -t spotify-tuiand running with something like thisdocker run --rm -p 8866:8866 -v ${PWD}/config:/root/.config/spotify-tui -it spotify-tui sptI can't seem to get anything after pasting the URL (which works and successfully tells me to go back to terminal, but then it seems like spt just dies and when I start again with my config it keeps asking me to enter the url. It seems like we don't have a device ID or something (?).My client ID looks something like:
@Rigellute commented on GitHub (Feb 24, 2020):
Interesting!
We could add a
hostoption touser_configto allow you to define your own host.As to the unexpected behaviour, my guess is that
spotify-tuiis trying to read and write your config files located in${HOME}/.config/spotify-tui/- perhaps this is not playing nicely with docker?When
spotify-tuistarts up, it checks for the existence of the configuration files in that directory, if not found it starts the authentication flow. Once complete it writes the tokens etc. to that file@raschmitt commented on GitHub (Sep 13, 2021):
A Docker version would be much appreciated.
@AkselAllas commented on GitHub (Dec 7, 2021):
I got the same exact scenario as @hongkongkiwi
I had to use
rust:1.57to get the image to build, but otherwise it's the same.Server works, clicking on link works. After clicking on link,
sptexits with code 101.I tried adding a different entrypoint, but the
sptprocess exits nonetheless.@Rigellute Seems like
${HOME}/.config/spotify-tui/isn't the problem either.Can we make some progress with this issue?
@AkselAllas commented on GitHub (Dec 10, 2021):
Docker version
@AkselAllas commented on GitHub (Dec 10, 2021):
@Rigellute @raschmitt How could I create a spotify-tui debug build that would give a stacktrace in docker?
I tried changing entrypoint to start with
RUST_BACKTRACE=fulland i tried addingto Cargo.toml
@Rigellute commented on GitHub (Dec 10, 2021):
@AkselAllas does
RUST_BACKTRACE=1help at all?@AkselAllas commented on GitHub (Dec 10, 2021):
in Dockerfile
CMD RUST_BACKTRACE=1 sptdoesn't help.Running shell in image and then running it doesn't help either.

Exporting it as env variable gives the same result.
@AkselAllas commented on GitHub (Dec 13, 2021):
I looked at the TLS traffic (after trying to decrypt) in the docker scenario with wireshark.
Seems like there are 2 distinct communications:


The first I could decrypt using Google-chrome's SSL log
The second I couldn't decrypt when using docker:
@AkselAllas commented on GitHub (Dec 13, 2021):
When I look at non-docker wireshark traffic:
I still couldn't decrypt using browser TLS log(I assume it's a rust package doing the TLS)
The only thing to note is that the packet size from Spotify is the same (709)
The packet (Same for both :D ):

@Rigellute this is where my debug skills end at the moment.
@AkselAllas commented on GitHub (Jan 18, 2022):
@Rigellute
RUST_BACKTRACE=1doesn't help. Is there any tutorial for how to debug this project?