#how do i check the presence of a file in a container

1 messages Β· Page 1 of 1 (latest)

trail nexus
#

Hi Folks

whats the best way to check if a file is present in a container ?

Thanks

rose grotto
trail nexus
trail nexus
#

i want to continue exeting if the actual file is missing. is that possible ?

#

βœ” connect 0.4s
βœ” initialize 3.3s
βœ” prepare 0.0s
βœ” tester: Tester! 0.0s
✘ Tester.buildTools: Container! 0.7s
! call function "BuildTools": process "/runtime" did not complete successfully: exit code: 2
┃ file exist false                                                                                                                                                                                                                                              
┃ file exist false                                                                                                                                                                                                                                              
┃ marshal: json: error calling MarshalJSON for type *dagger.Container: input: container.from.withMountedCache.withEnvVariable.withExec.directory resolve: /t3dp/app/latest: cannot retrieve path from cache                                                     
  βœ” Container.from(address: "alpine:latest"): Container! 0.2s
  ✘ Container.file(path: "/t3dp/app/latest"): File! 0.0s
  ! /t3dp/app/latest: cannot retrieve path from cache
  ✘ Container.file(path: "/t3dp/app/latest"): File! 0.0s
  ! /t3dp/app/latest: cannot retrieve path from cache
  ✘ Container.directory(path: "/t3dp/app/latest"): Directory! 0.0s
  ! /t3dp/app/latest: cannot retrieve path from cache

here is the error

trail nexus
#

starting to get it .... i cant do that on a mounted volume .. <facepalm/>