Next.js Discord

Discord Forum

Unable to dockerize NextjS app

Unanswered
Schweizer Laufhund posted this in #help-forum
Open in Discord
Schweizer LaufhundOP
I'm using the same dockerfile/dockerignore as this example https://github.com/vercel/next.js/tree/canary/examples/with-docker
Also my next config looks like this
/** @type {import('next').NextConfig} */
const nextConfig = {
  output: "standalone", // Outputs a Single-Page Application (SPA).
  distDir: "./dist", // Changes the build output directory to `./dist/`.
  webpack: (config) => {
    config.externals.push("@node-rs/argon2", "@node-rs/bcrypt");
    return config;
  },
};

export default nextConfig;


I keep getting this error, no clue why. its not in the gitignore
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ab30b88e-e116-445c-95ea-31c5ebc5b345::rcglug9rb3wobh6btd092kpsq: "/app/.next/static": not found

1 Reply

Schweizer LaufhundOP
"/app/public": not found
seems like /app directory not beign generated from docker?