simple:
image: busybox:1.31.0-uclibc
command: sh -c "echo hello && tail -f /dev/null"
another:
command: sh -c "sleep 2 && echo world && /bin/false"
restart: "on-failure:2"