Skip to content
Open

deer #16

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "Container starting..." >> /var/log/container.log
echo "Initialization complete." >> /var/log/container.log