nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

Some images arent created as *.img and doesnt get recognized as image #1336

Closed fl0wm0ti0n closed 2 years ago

fl0wm0ti0n commented 2 years ago

for example if i run following commands:

flow@lightmachine:~$ ops image create --package eyberg/mongodb:4.4.6
 100% |████████████████████████████████████████|  [0s:0s]
onprem image '/home/flow/.ops/images/mongod' created...
flow@lightmachine:~$
flow@lightmachine:~$ ops image list
+----------------------------+---------------------------------------------------+---------+-----------+
|            NAME            |                       PATH                        |  SIZE   | CREATEDAT |
+----------------------------+---------------------------------------------------+---------+-----------+
| CMake-WSL2-TestProjekt.img | /home/flow/.ops/images/CMake-WSL2-TestProjekt.img | 18.8 MB | 1 day ago |
+----------------------------+---------------------------------------------------+---------+-----------+

i dont see the new image "mongod"

with ls i see it is there:

flow@lightmachine:~$ ls /home/flow/.ops/images/
CMake-WSL2-TestProjekt.img  mongod  node

if i rename the file "mongod" to "mongod.img" the following now lists the image:

flow@lightmachine:~$ ops image list
+----------------------------+---------------------------------------------------+----------+---------------+
|            NAME            |                       PATH                        |   SIZE   |   CREATEDAT   |
+----------------------------+---------------------------------------------------+----------+---------------+
| CMake-WSL2-TestProjekt.img | /home/flow/.ops/images/CMake-WSL2-TestProjekt.img | 18.8 MB  | 1 day ago     |
+----------------------------+---------------------------------------------------+----------+---------------+
| mongod.img                 | /home/flow/.ops/images/mongod.img                 | 107.4 MB | 2 minutes ago |
+----------------------------+---------------------------------------------------+----------+---------------+

so the solution would be to everytime create images with *.img

for example this example ops pkg load eyberg/node:v14.2.0 -p 8083 -f -n -a hi.js did also create an wrong image

eyberg commented 2 years ago

i'm just rming this chk for now https://github.com/nanovms/ops/pull/1344 but leaving #517 open

francescolavra commented 2 years ago

https://github.com/nanovms/ops/pull/1344 removed the .img suffix for all on-prem image files. This solves the issue, now all on-prem images created by ops are correctly listed by ops image list.