From f698c26cebefb70c0e364ce80e266d618ee216d1 Mon Sep 17 00:00:00 2001 From: Himanshu Kumar <97390553+agarwalhimanshugaya@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:49:04 +0000 Subject: [PATCH] add docker file --- dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..a86758c --- /dev/null +++ b/dockerfile @@ -0,0 +1,18 @@ +# Use the official Nginx image from the Docker Hub +FROM nginx:latest + +# Remove the default Nginx website +RUN rm -rf /usr/share/nginx/html/* + +# Copy the current directory contents into the Nginx web directory +COPY . /usr/share/nginx/html + +# Expose port 80 to the outside world +EXPOSE 80 + +# Run Nginx in the foreground (this ensures the container stays running) +CMD ["nginx", "-g", "daemon off;"] + +#run this app you have to use 2 command +# 1. docker build -t your-image-name +# 2. docker run -d -p 3000:80 your-image-name \ No newline at end of file