anchore / anchore-engine

A service that analyzes docker images and scans for vulnerabilities
Apache License 2.0
1.57k stars 273 forks source link

Can't setup Local Swagger UI #1383

Open simonedimaria opened 2 years ago

simonedimaria commented 2 years ago

Launching

curl -O https://engine.anchore.io/docs/quickstart/anchore-swaggerui-nginx.conf
docker-compose up -d

gives me the following error:

WARNING: Found orphan containers (tools_anchore-prometheus_1, tools_anchore-swagger-ui-nginx_1, tools_anchore-swagger-ui_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing tools_swagger-ui-nginx_1
tools_swagger-ui_1 is up-to-date
tools_db_1 is up-to-date
tools_catalog_1 is up-to-date
tools_policy-engine_1 is up-to-date
tools_analyzer_1 is up-to-date
tools_queue_1 is up-to-date
tools_api_1 is up-to-date
Recreating bd9ac395868e_tools_swagger-ui-nginx_1 ... 
Recreating bd9ac395868e_tools_swagger-ui-nginx_1 ... error

ERROR: for bd9ac395868e_tools_swagger-ui-nginx_1  Cannot start service swagger-ui-nginx: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/simone/Scrivania/tools/anchore-swaggerui-nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/simone/Scrivania/tools/anchore-swaggerui-nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for swagger-ui-nginx  Cannot start service swagger-ui-nginx: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/simone/Scrivania/tools/anchore-swaggerui-nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/simone/Scrivania/tools/anchore-swaggerui-nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.