docker / sbom-cli-plugin

Plugin for Docker CLI to support SBOM creation using Syft
Apache License 2.0
150 stars 15 forks source link

Installing plugin without Docker Desktop #25

Open Luskidoo opened 2 years ago

Luskidoo commented 2 years ago

What would you like to be added: When trying to install the plugin without Docker Desktop I was seeing the error "docker is not installed; refusing to install to '~/.docker/cli-plugins". After some investigation I realised that Docker Desktop creates the .docker folder, and that if I create the .docker folder manually the plugin can then be installed. Can the install script be updated to create the .docker folder if the user is not using Docker Desktop?

Why is this needed: Allows for installation of the plugin without Docker Desktop.

zdtsw commented 2 years ago

I assume install.sh was tested on Mac with Docker Desktop installed. For Linux kinda OS, could be a check $OSTYPE with mkdir -p ~/.docker/cli-plugins . or push to dockerhub, then user can run docker plugin install sbom

drjasonharrison commented 1 year ago

Experienced this problem on Nvidia Jetson TX2. Docker command line is definitely installed. Created $HOME/.docker and was able to run install.sh.