Skip to content

Conversation

@ilolm
Copy link
Owner

@ilolm ilolm commented Nov 4, 2024

In order to reduce time consumed to deploy container. Unfortunately only php-fpm and nginx were added, mysql wasn't added because its huge size. In future I'm gonna try to bypass those issues related to constant time consumers as well.

In order to reduce time consumed to deploy container. Unfortunately only php-fpm and nginx were added, mysql wasn't added because its huge size. In future I'm gonna try to bypass those issues related to constant time consumers

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


# Adding images
docker image load -i /docker-images/nginx.tar
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

@ilolm
Copy link
Owner Author

ilolm commented Nov 4, 2024

To-do: Manual testing required

1. Added waiting for the docker engine to start.
/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

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

@ilolm
Copy link
Owner Author

ilolm commented Nov 5, 2024

All the tests have passed successfully.

Summation of changes:

Added pre-installed php-fpm image.

  • Copying image inside the stage in Dockerfile
  • Added waiting for the docker engine to start
  • Added loading the php-fpm image into docker engine
  • Added ability to use CMD statement in Dockerfile

@ilolm ilolm merged commit 68ea4bd into main Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants