Hacker News new | ask | show | jobs
by satvikpendem 1158 days ago
You don't have to use their hosting. I use their NextJS Docker container on Hetzner and it works just fine.
2 comments

Does the <Image> tag work with the docker container? GP's issue is with how vercel was pushing the <Image> tag a lot yet it doesn't work when in static site generation mode which is used by a lot of people.
It doesn't work in SSG, no, but it works in SSR just as if you hosted on Vercel itself. That's what I do, SSR instead of SSG, because for my app the distinction is unnecessary if I'm hosting it myself.
You can disable it to make it behave like an Image tag https://nextjs.org/docs/api-reference/next/image#unoptimized It works, it's just not optimized, that's not the same thing.
It's 2023 what kind of plebeian is using raw image tags? NextJS's OSS design is exactly what it should be, I want the image tag. I don't want Vercel boxing me into a choice:

  1. Serving images over Node.
  2. Using Vercel.
I also don't want to eject code that is sitting right there in the repo. And I don't want to maintain a fork of a homebrew reimplementation of it.
I didn’t know they have a Next.js Docker image. Why do we specifically need theirs? I roll my own based on node:lts-alpine via GitHub Actions and push it to my Docker registry on GitHub.
You don't but it makes productionizing easy, I just have to pull their latest image for every build and it should work, since it's their official image.