Skip to content

[BUG] Docker COPY failed #6882

@Shramkoweb

Description

@Shramkoweb

Describe the bug

Dockerfile:26
--------------------
  26 |     ENV NODE_ENV=production
  27 |    
  28 | >>> COPY --from=builder /app/refine/public ./public
  29 |    
  30 |     RUN mkdir .next
--------------------

ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref vv7m8qgxfc7oxqvocfi5sjxin::xy4sdm9xee52jxzhebw68if40: "/app/refine/public": not found

In this project, we are utilizing https://github.com/refinedev/dockerfiles/blob/main/nextjs/Dockerfile.

Please refer to Line 28 for further details: https://github.com/refinedev/dockerfiles/blob/main/nextjs/Dockerfile#L28.

The command npm create refine-app@latest -- -o refine-nextjs my-refine-nextjs-app is intended to generate an app with public folder; however, it appears that the template does not create this folder by default. This oversight may be the reason for the error when attempting to copy /app/refine/public to ./public.

Steps To Reproduce

  1. Generate app withnpm create refine-app@latest -- -o refine-nextjs my-refine-nextjs-app
  2. Try to run Docker build with Dockerfile
  3. ERROR: failed to build

Expected behavior

Dockerfile must be aligned with the project structure after npm create refine-app@latest -- -o refine-nextjs my-refine-nextjs-app

Packages

"@refinedev/cli": "^2.16.46",
"@refinedev/core": "^4.57.9",
"@refinedev/devtools": "^1.2.16",
"@refinedev/kbar": "^1.3.16",
"@refinedev/nestjsx-crud": "^5.0.12",
"@refinedev/nextjs-router": "^6.2.3",
"@refinedev/react-hook-form": "^4.10.1",
"@refinedev/react-table": "^5.6.17",

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions