Does anyone know of a Docker image which comes with preinstalled next.js?
Unanswered
Oak rough bulletgall wasp posted this in #help-forum

Oak rough bulletgall waspOP
I need an optimized docker image for devspace to run my next.js application for development! Would love if anyone knows about if such an docker image exist, because I can't find any!!!
6 Replies

Masai Lion
FROM node:18
RUN npm i -g next@latest

Golden-winged Warbler
I based my Dagger setup on this, but had to make some adjustments: https://geshan.com.np/blog/2023/01/nextjs-docker/
(dagger): https://github.com/hofstadter-io/hof/blob/_dev/next/ci/dagger.mts#L166
(dagger): https://github.com/hofstadter-io/hof/blob/_dev/next/ci/dagger.mts#L166

Oak rough bulletgall waspOP
roger, well its because devSpace works with devImages which is Prebuilt images used for development are usually generic images that do not contain your application or any source code. They often only contain the necessary tooling to build, run, and debug your application in the appropriate language.
- then they file sync ones source code directly into that to then be able to build and run it for much faster compilation.
unfortunately they don't have a prebuilt devImage ... so one would have to serve that for them, I'm more looking for such an image. 😄
- then they file sync ones source code directly into that to then be able to build and run it for much faster compilation.
unfortunately they don't have a prebuilt devImage ... so one would have to serve that for them, I'm more looking for such an image. 😄
But i'll try with that ! thanks 😄

Golden-winged Warbler
yeah, sounds like you probably just need the first parts of the Dockerfile from my first link, assuming devspace can use 3rd-party images

Oak rough bulletgall waspOP
they can! 😄