dustin / gopro

Tools for making the most out of GoPro Plus.
http://dustin.sallings.org/2020/04/29/gopro-plus.html
BSD 3-Clause "New" or "Revised" License
93 stars 13 forks source link

Request: docker container #6

Open ctrlbrk42 opened 2 years ago

ctrlbrk42 commented 2 years ago

Thank you for the great contribution.

However, I really need this to be in a docker container to make use of it in my environment.

Could I please ask you put together an image? It would increase adoption, no doubt.

dustin commented 2 years ago

That doesn't sound too unreasonable. I use it via nix mostly (or just build it myself) since I mainly use the commandline tools.

Would you expect to use it as a CLI tool via docker?

Otherwise, I'd need to provide a means of upload and backups via web. Backups would be fairly straightforward, but uploads might be more difficult. Uploads via shared directory wouldn't be too bad probably.

ctrlbrk42 commented 2 years ago

That doesn't sound too unreasonable. I use it via nix mostly (or just build it myself) since I mainly use the commandline tools.

Would you expect to use it as a CLI tool via docker?

Otherwise, I'd need to provide a means of upload and backups via web. Backups would be fairly straightforward, but uploads might be more difficult. Uploads via shared directory wouldn't be too bad probably.

Fantastic! Yes, I would add it to a docker-compose and then try to automate the entire process of downloading my media via cronjobs.

I haven't looked at the uploads yet. Right now, my first priority is just downloading the media off the GoPro cloud so I have it on my own server and within my own control. I do enjoy the GoPro Cloud for ease-of-use for uploading media.

I would just like the ability to specify a target directory for the downloads. I can then use a docker volume to mount that where I need it to be via NFS or whatever.

I'll have to explore your upload options.

dustin commented 2 years ago

Oh cool. Yeah, that's a pretty useful use case, and was the first thing I was concerned about. I started caring more about uploads when my connectivity was bad and I had a lot of media to upload (including a lot of older GoPro footage). I still use it quite a bit because it's convenient.

But backups are the "don't lose my media" feature, so makes sense to prioritize.

I'll spend a bit of time trying to figure out docker again. It seems like a worse nix, but people use it. :)

dustin commented 1 year ago

There's a preliminary build at https://hub.docker.com/repository/docker/dustin/gopro -- it's kind of large and probably not super convenient to use, but this isn't really how I work, so I'm not entirely sure what's best just yet. I can probably come up with a login UI, but upload UIs are going to be harder.

jaredririe commented 1 year ago

I wasn't able to get the Installation steps working from the README (due to stack install compile-time errors), so I tried out your dustin/gopro docker image. It worked for my use case, which was downloading all of my GoPro Cloud content locally. These are the commands I ran:

docker run --interactive --volume $PWD:/usr/lib/gopro dustin/gopro:master gopro auth

docker run --interactive --volume $PWD:/usr/lib/gopro dustin/gopro:master gopro sync

docker run --interactive --volume $PWD:/usr/lib/gopro dustin/gopro:master gopro backuplocalall /usr/lib/gopro

Note that I had to create a volume so that the gopro.db file with the auth data could be used in the subsequent commands. I provided the --interactive Docker option for gopro auth so that I could type in my credentials. It's probably not needed for the other commands.

dustin commented 1 year ago

Neat. I don't use docker, but it's great that people can benefit from this (and tell me and others how to use it).

(Also, reminding me to go grab my camera since I was out in the ocean for four hours this morning)

dustin commented 1 year ago
docker run --interactive --volume $PWD:/usr/lib/gopro dustin/gopro:master gopro auth

docker run --interactive --volume $PWD:/usr/lib/gopro dustin/gopro:master gopro backuplocalall /usr/lib/gopro

I think you'd need a sync in there somewhere. The backup is only going to get the stuff it already knows about.

jaredririe commented 1 year ago

I think you'd need a sync in there somewhere. The backup is only going to get the stuff it already knows about.

You're correct. I did have a sync as well. I'll edit my above message to reflect that.