Skip to content

I am facing issues with DOCKER build #1141

Open
@Atal-Durgesh

Description

@Atal-Durgesh

Hi team,

I am trying to build the docker image, but my build gets stuck.
How much time ideally it should take, because I tried it is taking more than 1 hour and most of the time it gets stuck
Here is my docker file
`# Stage 1: Build the site
FROM node:20-alpine AS builder

Install required packages

RUN apk add --no-cache python3 git

Set working directory

WORKDIR /app

Copy project files

COPY . .

Install dependencies using Yarn

RUN corepack enable && yarn install --frozen-lockfile

Build the static site

RUN yarn build

Stage 2: Serve using a lightweight web server (nginx)

FROM nginx:alpine

Remove default nginx site config

RUN rm -rf /usr/share/nginx/html/*

Copy built site from builder

COPY --from=builder /app/build /usr/share/nginx/html

Expose port 80

EXPOSE 80

Run nginx in foreground

CMD ["nginx", "-g", "daemon off;"]
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions