your problem has nothing to do with the data dir. or me it looks lik you entered the command somehow wrong and for this reason your server doesn’t recognize the image name as part of docker run command buth rather tries to run the command ghcr.io/nextcloud-releases/all-in-one:latest: which obviously doesn’t exist.
Best guess without having the literal string to dissect, is that you have a space after the last \. You can sort of see what I mean by looking at the examples here.