diff --git a/Dockerfile b/Dockerfile index 90cef47..ac236f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,8 @@ -FROM vimal13/apache-webserver-php -COPY . /var/www/html -EXPOSE 80 +# Use Alpine as the base image +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"] 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