Comments (17)
What command are you using with docker? You should have used something with 1.8.1 and my guess it should just work (we added features and params, but did not change/remove anything in v1). Example
from icloud_photos_downloader.
Hi,
I tried a bit around and the last version that I can start is: 1.10.0
All later versions stop running unexpected immediately after I try to start the docker.
The only difference is, all versions below 1.10.0 using:
command: /bin/sh
versions 1.11.0 ++
Entrypoint: /app/exec
Could we change this back to /bin/sh?
from icloud_photos_downloader.
entrypoint is something that is running inside the container. for icloudpd to do something meaningful, you need to supply parameters, e.g. username. the output you gave suggests that parameters are not configured and you are given help info.
example params: "icloudpd -u your@address -d . --dry-run". note "icloudpd" as part of param. these params should be set somewhere in dsm ui
from icloud_photos_downloader.
I just tried on linux:
~$ docker run --rm -it icloudpd/icloudpd:1.8.0 icloudpd -u dummy@add -p abc -d .
2024-01-05 07:44:04 DEBUG Authenticating...
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 209, in authenticate
File "requests/sessions.py", line 635, in post
File "pyicloud_ipd/base.py", line 100, in request
File "pyicloud_ipd/base.py", line 122, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason
log suggests that icloudpd started and tried to authenticate (and failed since my email and passwords were bogus)
from icloud_photos_downloader.
Let me show you the setup that was working for all versions below 1.10.0 (with commands). Please bear with me - I don't have that much experience :) Any help would be greatly appreciated :)
- Docker Setup:
- Script (now a short one - usually filled with folder details, structure, etc.)
- Schedule setup
- Log
Again, I can not simply start the docker image via ui to get a console to e.g. setup keyring. It directly stops working shortly after pressing START button.
Previously it worked :)
Thanks.
from icloud_photos_downloader.
I cannot read language in UI (German?), nor do I know much about Synology. With that in mind let's see how far we can go.
To start container from image, one has to specify a) image b) setup for container c) parameters for the app in container (if any). For icloudpd:
- image is "icloudpd/icloudpd:1.17.3" and it is specified in UI on screen 1
- setup for container includes volume mapping between host and container (default is full isolation) and UI has that on screen 1
- parameters for icloudpd itself specified in screen 2 are incomplete as "-d" is required. Should be "icloudpd -u aaa -p bbb -d /icloud"
All three components should be provided together to start container. You can either put full "docker run ..." cmd in icloudpd.sh and than run that shell script from scheduler or avoid shell script all together and use "docker run ..." in scheduler setup, but splitting functionality as shown on screens 2 & 3 would not work IIUC.
Screen 3 shows start, exec, and stop command, I would recommend using on one "docker run" instead. I don't understand how Synology UI combines image and setup from screen 1 with cmd in screen 3. Screen 3 with all combined should look: "docker --rm -i -v /volume1/docker/icloud:/icloud:rw -e TZ=UTC icloudpd/icloudpd:1.17.3 icloudpd -u aaa -p bbb -d /icloud".
You can also use "--watch-with=interval 3600" parameter and avoid using scheduler all together - icloudpd will run infinitely and synchronize icloud content to your drive periodically.
from icloud_photos_downloader.
I see that DSM has support for docker-compose (called container projects). That may be easier to setup in UI.
Docker-compose is a simplest way to orchestrate containers. Once you define "service" with all params we supplied to "docker run", you can use start and stop cmds (without repeatedly specifying params again). Should work well with "--watch-with-interval" param as with it icloudpd becomes a service that runs until stopped.
from icloud_photos_downloader.
from icloud_photos_downloader.
Hi β its me againπ
I think we compare apples and pears.
What I used in the past and that was working perfectly fine is the approach I described above. Till entrypoint was introduced π
- Set up a container in docker gui
- Started the container from gui and connected to Terminal
- Within the docker I configured keyring and could execute icloudpd with parameter to download the images
later I configured the scheduler to download images by handing over the icloudpd parameter statement via a script. Only from time to time I need to do 2.) to re-setup keyring.
I always re-used the same container.
Now since you introduced entrypoint I have no chance to simply start the container and access the shell inside the container to configure e.g. keyring.
the approach with:
docker run --rm -i -v /volume1/docker/icloud:/icloud:rw -e TZ=UTC icloudpd/icloudpd:1.17.3 icloudpd -u aaa -p bbb -d /icloud
was indeed working but how can I then leverage keyring to not have password in clear text.
Best
Roman
from icloud_photos_downloader.
docker run --rm --entrypoint /bin/ash -i -v /volume1/docker/icloud:/icloud:rw -e TZ=UTC icloudpd/icloudpd:1.17.3
That will get you a command prompt inside the container. Just run your icloudpd -u aaa -p bbb -d /icloud
command from there and then restart the container.
from icloud_photos_downloader.
As mentioned above by @boredazfcuk , you can get command prompt into container by overriding entrypoint. Here is my session:
[~]$ docker run --rm -it --entrypoint /bin/sh icloudpd/icloudpd:1.17.3
Unable to find image 'icloudpd/icloudpd:1.17.3' locally
1.17.3: Pulling from icloudpd/icloudpd
c926b61bad3b: Already exists
f821361375b1: Pull complete
e619753a56d7: Pull complete
eb0652d33051: Pull complete
4f4fb700ef54: Pull complete
2647709a09f9: Pull complete
Digest: sha256:c28e9ac5bae49122bd8007be7d89582e793434341c539b7d1244f2e3bcb52898
Status: Downloaded newer image for icloudpd/icloudpd:1.17.3
/app # ls
icloudpd_ex
/app # icloudpd_ex --help
/bin/sh: icloudpd_ex: not found
/app # ./icloudpd_ex --help
Usage: icloudpd-ex-1.17.3-linux-amd64.dynamic [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
auth Manages persistant credentials
copy Copy assets from iCloud to local storage
icloud Legacy iCloud utils (keyring)
icloudpd Download all iCloud photos to a local directory
move Move assets from iCloud to local storage
watch Watch for iCloud changes
/app #
Note that "script" that is packaged inside docker container is called icloudpd_ex
, not icloudpd
, and it accepts icloudpd
and icloud
commands (the rest of commands are experimental), so you have to run it as ./icloudpd_ex icloudpd -u aaa -p bbb -d /icloud
as if icloudpd_ex
is another shell. To manage keyring you'll use ./icloudpd_ex icloud
.
Note: I don't use keyring, so I cannot comment on the expected behavior of keyring inside the container.
from icloud_photos_downloader.
Thanks guys / I will try it tomorrow but your way is still different as I used in the past.
The docker run command runs a command in a new container, pulling the image if needed and starting the container with parameters.
I used to restart a stopped container with all its previous changes intact using docker start out of scheduler or via docker gui app. Main reason was to have keyring within docker not touching the NAS os.
But as docker start command obviously does not allow to over right entry point it will not work anymore. Then I only have chance to give Passwort in clear text via script.
from icloud_photos_downloader.
You may be able to start container with new entrypoint and then reuse it -- you have to experiment.
from icloud_photos_downloader.
The docker run command runs a command in a new container, pulling the image if needed and starting the container with parameters.
Your run command contains --rm
. This removes the container after it exits, including the keyring file and cookie that is created inside your container as they do not live in the path which you have mapped to persistent storage (/icloud)
I used to restart a stopped container with all its previous changes intact using docker start out of scheduler or via docker gui app. Main reason was to have keyring within docker not touching the NAS os.
Then your previous container could not have been created with the --rm
command line parameter. If a container is run with this parameter, it is deleted when the container is next stopped.
But as docker start command obviously does not allow to over right entry point it will not work anymore. Then I only have chance to give Passwort in clear text via script.
Using --entrypoint /bin/sh
overwrites the entrypoint inside the container.
from icloud_photos_downloader.
Exactly I did not used βrm , this came from Andrey π
I just downloaded the image once from GitHub.
Created a container via gui assistant and mapped some folders and pressed the START button.
Then the container was running and I could connect via Terminal from Docker gui to the container. The keyring setup / cookie was stored in mapped folder. Afterwards I could press STOP container button.
When I want to download pictures I just had 3 commands in my scheduler taskplaner.
1.) docker start [containername]
2.) sh [script icloudpd with all parameters] stored in mounted folders
3.) docker stop [containername]
π€
Using --entrypoint /bin/sh overwrites the entrypoint inside the container.
does not help to start created container in docker gui -> it directly stops unexpected
If you like we can do a screen sharing session to figure out best way - using keyring in docker
from icloud_photos_downloader.
Give this a go:
docker create --name icloudpd --interactive --entrypoint /usr/bin/env -v /volume1/docker/icloud:/icloud:rw -e TZ=UTC icloudpd/icloudpd:1.17.3 /bin/sh
docker start icloudpd
docker exec -it icloudpd /bin/sh
This should get you a terminal prompt in the running container.
from icloud_photos_downloader.
Hi both,
Thank for your great support.
@boredazfcuk: This is the statement I needed:
docker create --name icloudpd --interactive --entrypoint /usr/bin/env -v /volume1/docker/icloud:/icloud:rw -e TZ=UTC icloudpd/icloudpd:latest /bin/sh
With running this statement once via taskplanner I can create a container into Synology docker app that can simply started and stopped! I can also simply connect to terminal via this app to do Keyring setup.
I simply cannot use the Synology Docker App Assistant anymore to create a container as I can not give the relevant parameters. But this is absolutely fine to do it once via a Taskplanner script or SSH.
Thanks again!!
from icloud_photos_downloader.
Related Issues (20)
- Images not getting deleted in Shared LIbrary with delete_after_download=true HOT 5
- Two-step/two-factor authentication is required (2fa) HOT 33
- 2FA throw errors HOT 1
- [RFC] Headless mode for Improving Authentication HOT 2
- ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate
- publish source tarball to pypi? HOT 13
- The China region ID login shows an authentication error HOT 8
- Just trying to get started, no dice. HOT 7
- icloud.com.cn : Failed to download new files
- Can rogue items occur??
- Container Stopped Unexpectedly HOT 3
- iCloudPD needs to check expiration date before initialization HOT 1
- ERROR Invalid username/password combination. (401) HOT 5
- Auto Delete doesn't work with folder-structure set to none
- Windows 1.17.5 version detected as Trojan:Win32/Bearfoos.A!ml HOT 4
- x86 1.17.5: "--help" option returns help for 'Find My iPhone CommandLine Tool', not iCloudPD HOT 2
- System Keyring Error
- NameError: name 'PyiCloudConnectionException' is not defined. Did you mean: 'PyiCloudFailedLoginException'? HOT 1
- Authentication failure - failed to parse response with JSON mimetype HOT 1
- Make it default download from all available libraries? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icloud_photos_downloader.