digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 397 forks source link

Upload image from local fileystem #997

Open JohnAZoidberg opened 3 years ago

JohnAZoidberg commented 3 years ago

What is the problem this feature would solve? Please describe. Currently the doctl compute image create command just allows to create an image based on a URL. What if I build an image locally or on another droplet. How can I add it as an image?

Describe the solution you'd like Add --image-path as an alternative for --image-url to upload local files as images.

andrewsomething commented 3 years ago

Hi @JohnAZoidberg,

Thanks for the suggestion. Currently the API does not support directly uploading an image. One work around is to first uploaded the image to DigitalOcean Spaces. You can then get a URL and import it from there. For example, we do this in the DigitalOcean importer for Packer.

EugeneJao commented 7 months ago

it's inconvenience for us to upload image by url. i even cannot troubleshoot the uploading issue on control panel.