FROM nginx:latest RUN apt-get update && apt-get install -y nodejs npm netcat-openbsd WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build WORKDIR /usr/share/nginx/html COPY index.html . COPY default.css . RUN mkdir -p /usr/share/nginx/html/public RUN cp /app/build/* ./public HEALTHCHECK CMD nc -z 127.0.0.1 80 EXPOSE 80