#With Dagger 0.18.10, I'm using `finch`

1 messages · Page 1 of 1 (latest)

hallow willow
#

what's finch?

from the output it seems like it left the original container there, which is why it "worked" - blind guess though

#

maybe its docker ps command works differently - it didn't find anything, but then there was a name conflict anyway

spark thistle
#

It was created by the folks at AWS

spark thistle
hallow willow
spark thistle
#

Yep different @hallow willow

With docker -> finch, no output from our docker ps

Use "finch [command] --help" for more information about a command.
~  docker ps
CONTAINER ID    IMAGE                                 COMMAND                   CREATED        STATUS    PORTS    NAMES
e49c0354bb8b    registry.dagger.io/engine:v0.18.9     "dagger-entrypoint.s…"    3 hours ago    Up                 dagger-engine-v0.18.9
c604f3fe2884    registry.dagger.io/engine:v0.18.10    "dagger-entrypoint.s…"    3 hours ago    Up                 dagger-engine-v0.18.10
~  docker ps -a --no-trunc --filter "name=^dagger-engine-|^dagger-engine-v0\\.18\\.10$" --format "{{.Names}}"

With actual docker

~  docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS          PORTS     NAMES
8d46f7dd88ac   registry.dagger.io/engine:v0.18.10   "dagger-entrypoint.s…"   22 seconds ago   Up 21 seconds             dagger-engine-v0.18.10
~  docker ps -a --no-trunc --filter "name=^dagger-engine-|^dagger-engine-v0\\.18\\.10$" --format "{{.Names}}"
dagger-engine-v0.18.10 ⬅️
hallow willow
#

ah maybe they don't support --format

spark thistle
#

--filter not working...

~ ➤ docker ps
CONTAINER ID    IMAGE                                 COMMAND                   CREATED        STATUS    PORTS    NAMES
e49c0354bb8b    registry.dagger.io/engine:v0.18.9     "dagger-entrypoint.s…"    3 hours ago    Up                 dagger-engine-v0.18.9
c604f3fe2884    registry.dagger.io/engine:v0.18.10    "dagger-entrypoint.s…"    3 hours ago    Up                 dagger-engine-v0.18.10
~ ➤ docker ps -a --no-trunc --filter "name=^dagger-engine-|^dagger-engine-v0\\.18\\.10$"

CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
~ ➤
#
  -f, --filter strings   Filter matches containers based on given conditions. When specifying the condition 'status', it filters all containers
#

It's choking on the regex
works without it

~  docker ps -a --no-trunc --filter "name=dagger-engine-" --format "{{.Names}}"
dagger-engine-v0.18.9
dagger-engine-v0.18.10
#

@hallow willow I wonder if we could get away with the simpler filter 👆

works with actual docker too

~  docker ps -a --no-trunc --filter "name=dagger-engine-" --format "{{.Names}}"
dagger-engine-v0.18.10
hallow willow
#

yeah probably, it looks like it's already including that so not sure why we'd also want the more specific match

spark thistle
#

this works too (*), used many places

docker ps -a --no-trunc --filter "name=dagger-engine-*" --format "{{.Names}}"
dagger-engine-v0.18.10
spark thistle
#

👆 I think I'll need @young agate to look at since the more complex regex filter that seems to be choking in some places was added here.

young agate
#

finch uses nerdctl

#

i'll be honest, i don't really understand how * works there (i can't get that to work actually)

root@e4af6a6d57fa:/# nerdctl ps
CONTAINER ID    IMAGE                              COMMAND            CREATED               STATUS    PORTS    NAMES
d21c34b4b65a    docker.io/library/alpine:latest    "sleep 1000000"    About a minute ago    Up                 foo-bar
root@e4af6a6d57fa:/# nerdctl ps --filter name="foo-"
CONTAINER ID    IMAGE                              COMMAND            CREATED               STATUS    PORTS    NAMES
d21c34b4b65a    docker.io/library/alpine:latest    "sleep 1000000"    About a minute ago    Up                 foo-bar
root@e4af6a6d57fa:/# nerdctl ps --filter name="foo-*"
CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
young agate
#

this is what allows the same logic to work with an arbitrary docker-image:// set in the env

#

the Match function supports regexp