From e04f88bcbce565e4c882f8d2f373b7dc9a44f2df Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Tue, 6 Aug 2024 13:16:31 +0530 Subject: [PATCH 01/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 90cef47..1a51b94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM vimal13/apache-webserver-php -COPY . /var/www/html +COPY . /var/www/html EXPOSE 80 From b307825f73806b1f087919b7ea6f5982c01a147d Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Tue, 6 Aug 2024 13:18:01 +0530 Subject: [PATCH 02/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1a51b94..5d2d9e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM vimal13/apache-webserver-php COPY . /var/www/html -EXPOSE 80 +EXPOSE 80 From fd61b216431664e6bf82dfa25c2b76e78dd466da Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:28:17 +0530 Subject: [PATCH 03/13] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5d2d9e9..ce01d8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ FROM vimal13/apache-webserver-php COPY . /var/www/html EXPOSE 80 + From 7bdfc45bb48e3714c2fa74d60467ee046fe9b05d Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:14:45 +0530 Subject: [PATCH 04/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ce01d8e..7e624e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM vimal13/apache-webserver-php +FROM busybox COPY . /var/www/html EXPOSE 80 From f00ba4314f65fbafea74459809aef88ef72cf85f Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 28 Feb 2025 14:45:34 +0530 Subject: [PATCH 05/13] Update Dockerfile --- Dockerfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e624e6..cca05eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,14 @@ -FROM busybox -COPY . /var/www/html -EXPOSE 80 - +# Use your base image (example: Alpine) +FROM alpine:latest + +# Install any necessary dependencies (if needed) +RUN apk update && apk add bash + +# Logging directly when container starts +ENTRYPOINT echo "Container starting..." >> /var/log/container.log && \ + echo "Initialization complete." >> /var/log/container.log && \ + +# Replace "your-main-command-here" with your container's main command +# For example, if you are running a web server, you might use: +# CMD ["nginx", "-g", "daemon off;"] + From 6ed4efab9681bfdfcaaa18378867f9ea480b6581 Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:04:25 +0530 Subject: [PATCH 06/13] Update Dockerfile --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index cca05eb..4daffcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ # Use your base image (example: Alpine) FROM alpine:latest -# Install any necessary dependencies (if needed) +# Install bash RUN apk update && apk add bash -# Logging directly when container starts -ENTRYPOINT echo "Container starting..." >> /var/log/container.log && \ - echo "Initialization complete." >> /var/log/container.log && \ - -# Replace "your-main-command-here" with your container's main command -# For example, if you are running a web server, you might use: -# CMD ["nginx", "-g", "daemon off;"] +# Copy the script +COPY start.sh /usr/local/bin/start.sh +RUN chmod +x /usr/local/bin/start.sh +# Use script as ENTRYPOINT +ENTRYPOINT ["/usr/local/bin/start.sh"] From 2dff46d1eb9aeebcd35425e65e0684d2a72fe0a1 Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:05:08 +0530 Subject: [PATCH 07/13] Create start.sh --- start.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 start.sh diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..ce94533 --- /dev/null +++ b/start.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo "Container starting..." >> /var/log/container.log +echo "Initialization complete." >> /var/log/container.log From 8cb2b406913e80b79b9cf42733425fe869b93452 Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:08:17 +0530 Subject: [PATCH 08/13] Update Dockerfile --- Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4daffcd..d27fa33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,8 @@ -# Use your base image (example: Alpine) +# Use Alpine as the base image FROM alpine:latest -# Install bash +# Install bash (if needed) RUN apk update && apk add bash -# Copy the script -COPY start.sh /usr/local/bin/start.sh -RUN chmod +x /usr/local/bin/start.sh - -# Use script as ENTRYPOINT -ENTRYPOINT ["/usr/local/bin/start.sh"] +# Use an inline shell command for logging +ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...' >> /var/log/container.log && echo 'Initialization complete.' >> /var/log/container.log && tail -f /dev/null"] From 501739d91176f9729fde617e14cd688ed005a761 Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:32:47 +0530 Subject: [PATCH 09/13] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d27fa33..7c30b7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,5 @@ FROM alpine:latest # Install bash (if needed) RUN apk update && apk add bash -# Use an inline shell command for logging -ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...' >> /var/log/container.log && echo 'Initialization complete.' >> /var/log/container.log && tail -f /dev/null"] +# Print logs to stdout instead of a file +ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...'; echo 'Initialization complete.'; tail -f /dev/null"] From 7d001d986f4b82e7b0601b7f78ad7847c3e7acaf Mon Sep 17 00:00:00 2001 From: aman10000q <141843326+aman10000q@users.noreply.github.com> Date: Fri, 7 Mar 2025 07:59:00 +0530 Subject: [PATCH 10/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7c30b7b..d6bb2a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ FROM alpine:latest # Install bash (if needed) RUN apk update && apk add bash - +RUN echo "Hello, this is my file content!" > /myfile.txt # Print logs to stdout instead of a file ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...'; echo 'Initialization complete.'; tail -f /dev/null"] From 0c1c09307e3bb68cf8b478664c6f46ae7e841bcd Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:39:59 +0530 Subject: [PATCH 11/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d6bb2a2..4643167 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ FROM alpine:latest # Install bash (if needed) RUN apk update && apk add bash -RUN echo "Hello, this is my file content!" > /myfile.txt +RUN echo "Hello, this is my file content!" > /myfile.txt # Print logs to stdout instead of a file ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...'; echo 'Initialization complete.'; tail -f /dev/null"] From e052c8185906f01aa2c1cf58336e7de937b95ade Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:40:06 +0530 Subject: [PATCH 12/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4643167..e027f51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use Alpine as the base image -FROM alpine:latest +FROM alpine:latest # Install bash (if needed) RUN apk update && apk add bash From dd5098e8a41413dc9145d9464e4ab505730ec1ca Mon Sep 17 00:00:00 2001 From: AmandeepBains <141843326+aman10000q@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:40:13 +0530 Subject: [PATCH 13/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e027f51..ac236f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ FROM alpine:latest RUN apk update && apk add bash RUN echo "Hello, this is my file content!" > /myfile.txt # Print logs to stdout instead of a file -ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...'; echo 'Initialization complete.'; tail -f /dev/null"] +ENTRYPOINT ["/bin/sh", "-c", "echo 'Container starting...'; echo 'Initialization complete.'; tail -f /dev/null"]