#Screwed engine.json

1 messages · Page 1 of 1 (latest)

olive river
#

im getting this error when i try to run the dagger cli:
▼ exec docker run --name dagger-engine-v0.18.10 -d --restart always -v /var/lib/dagger --privileged -v /home/pc/.config/dagger/engine.json:/etc/dagger/engine.json registry.dagger.io/engine:v0.18.10 --debug 0.5s ERROR
bd1b2a9f5dcffe33eef1195ab93457c539f740d2c5e4e47d83cc531ab2f0daae
docker: Error response from daemon: failed to create task for container:
to create shim task: OCI runtime create failed: runc create failed: unab
art container process: error during container init: error mounting "/hom
nfig/dagger/engine.json" to rootfs at "/etc/dagger/engine.json": mount /
.config/dagger/engine.json:/etc/dagger/engine.json (via /proc/self/fd/6)
0x5000: not a directory: unknown: Are you trying to mount a directory o
le (or vice-versa)? Check if the specified host path exists and is the e
type.
! failed to run command: exit status 125
Error: start engine: failed to run container: bd1b2a9f5dcffe33eef1195ab93457c539f740d2c5e4e47d83cc531ab2f0daae
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/pc/.config/dagger/engine.json" to rootfs at "/etc/dagger/engine.json": mount /home/pc/.config/dagger/engine.json:/etc/dagger/engine.json (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.
: failed to run command: exit status 125

I tried removing the ./config/dagger to start from scratch but it did not work.

Thanks for the help in advance!

ashen moat
#

the source location .config/dagger needs to exist if you're mounting it

#

oh sorry, i thought you were doing it manually

#

hm, that's a bit odd. if you do ls -lh /home/pc/.config/dagger/engine.json what do you get?

olive river
#

its empty now:
total 0

#

is there any engine.json by default that i can copy/paste?

ashen moat
#

there isn't a default 🤔

#

if it doesn't exist, it'll be ignored

#

if engine.json a directory by any chance?

#

it should either be:

ls -lh ~/.config/dagger/engine.json
-rw-r--r-- 1 jedevc jedevc 118 May 19 11:20 /home/jedevc/.config/dagger/engine.json
#

or

ls -lh ~/.config/dagger/engine.json
ls: cannot access '/home/jedevc/.config/dagger/engine.json': No such file or directory
#

you shouldn't get total 0

#

that implies that engine.json is a directory

olive river
#

ls -lh ~/.config/dagger/engine.json
ls: cannot access '/home/pc/.config/dagger/engine.json': No such file or directory

#

deleted, then i do "dagger"

hushed dove
olive river
#

it is :S

#

the "engine.json" folder is created again after i do "dagger"

#

in .config/

hushed dove
#

@olive river wanna do a quick audio call in Discord? I have 5m

#

otherwise we can try async

#

I can't seem to be able to repro what you're getting

olive river
#

yep

hushed dove
olive river
#

can you here me?

hushed dove
#

yes, I am

#

I'm sending you a DM

#

wait

#

you're root in the pane you're installing dagger

#

you shouldn't run it as root

#

@olive river

#

move away from that directory

#

go to some other dir

#

yep

#

try now please

#

that error makes sense

#

becuase you don't have an engine.json anymore

#

dagger core version

#

should work now

#

check if your ~/.config/dagger fodler exists

#

remove it please

#

the problem

#

was that you were removing it as root

#

and not as your user

#

yes

#

because rm ~/.config/dagger

#

was removing root'sconfig folder

#

not the PC user

#

just do sudo rm -rf /home/pc/.config/dagger

#

and then dagger core version

#

should work after that

#

wat?

#

haha

#

that engine.json is trange

#

yes, that makes sense

#

you ran a container before with that mounted

#

ok, now it should work

#

🚀

#

works

#

🎉

#

sure, we'll add it in the FAQ

#

you got tripped when you did sudo su -

#

and then you moved to root

#

that caused the whole confusion

olive river
#

thanks a lot 🙂