Skip to content
Merged
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
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ COPY ./main_flags/root.txt /root/root.txt
COPY ./main_flags/user.txt /home/king/user.txt
COPY ./docker-web /home/king/docker-web

# Copying php docker image
COPY ["./docker-images/php-fpm.tar", "/docker-images/"]
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying the image inside the container


RUN echo "Permissions for flags" \
&& chown root:root /root/root.txt && chmod 0400 /root/root.txt \
Expand Down
Binary file added docker-images/php-fpm.tar
Binary file not shown.
2 changes: 1 addition & 1 deletion docker-web/nginx.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:mainline-alpine3.20-slim
FROM nginx:1.27.2

# Installing needed software
RUN apt-get update && \
Expand Down
17 changes: 15 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@

set -e

dockerd &
/usr/sbin/sshd -D
# Starting docker daemon + starting ssh daemon
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments

dockerd > /dev/null 2>&1 &
/usr/sbin/sshd -D > /dev/null 2>&1 &

# Waiting for docker engine to start (until 'docker info' returns non-zero exit-code sleep 1)
until docker info >/dev/null 2>&1; do sleep 1; done
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for docker engine to start before loading the nginx image


# Adding php image
docker image load -i /docker-images/php-fpm.tar
Copy link
Owner Author

@ilolm ilolm Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loading php-fpm image into docker engine


# Cleaning images
rm -rf /docker-images

# Executing CMD statement
exec "$@"