0

I am attempting to create a Docker container using the official PHP 7.4 ZTS image without making any modifications. However, when I start the container, it immediately stops as if the entrypoint is incorrect.

My Dockerfile contains the following content: FROM php:7.4-zts-alpine

This is the result when I run docker compose up.

enter image description here

I have tried using other official ZTS images, but they also do not work.

1 Answers1

2

If you put tty: true in the docker-compose.yml, you will be able to keep the container running. You can also do this by using the -t flag in the docker command.

The reason FPM doesn't require it to keep the container running is that FPM is the entrypoint.

With ZTS, bash is the entrypoint -- So, once you add a tty: true to the container, bash will be able to create interactive session and the container will (or at least should be) started with bash as the entrypoint.

Zak
  • 6,976
  • 2
  • 26
  • 48