Debugging a failing image without a deployment

Occasionally I want to try a pre-built image from Dockerhub on Fly. To get it setup with all its requirements (like a database URL, etc), it would be useful to be able to run an image on a small VM with a shell command, without having to have a successful web deployment.

Is this possible right now somehow?

It’s possible, but more complex than I’d like.

What I do is create a Dockerfile with FROM <public image>, add bash if it’s not already there, override CMD to start a stub long running process (you might have to override ENTRYPOINT as well). Then deploy and use fly ssh console to get a shell and start poking.

I wonder if we can make this easier without many changes. Seems like “boot a Firecracker and keep it alive” might be doable.

Cool, thanks. One other thing that came up with this scenario is the Docker image expecting a REDIS_URL. I’d like to use the existing Redis cache instance. If I extract FLY_REDIS_CACHE_URL from a running instance, can I then set REDIS_URL without fear? Having a built-in way to do this would be cool too.

You should be able to use that URL for REDIS_CACHE_URL.

We probably won’t make that magical, our shared Redis cache has been deprecated and people are better off running redis processes themselves for the most part. We might introduce a fly redis command that behaves like Postgres, though, it’s relatively straightforward.

OK, good to know it’s been deprecated!

Where is it announced that shared redis is depreciated? The reference does not mention it.

@tullo It’s deprecated in the sense that we don’t recommend people use it much — there are better ways to run Redis, especially if you’re using it for something serious. But it does still work as documented.