I have build a Docker image and afterwards run a container using Docker Compose. The following command will do the job for me:
docker-compose up -d
I have restarted the PC and now I want to start the previous container that I've created before. So I have tried the following command:
$ docker-compose start
Starting php-apache ... done
Apparently it works but it doesn't as per the output for the following command:
$ docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------
php55devwork_php-apache_1 /bin/sh -c bash -C '/usr/l ... Exit 0
For sure something is wrong and I am trying to find out what.
Here is the repository if you want to give it a try.
Update
If I remove the container: docker rm <container-id>
and recreate it by running docker-compose up -d --build
it works again.
Update #1
I am not able to see such weird characters:
This is what helped me to resolve this issue: Under one of your services in the docker-compose yaml file, type in the following:
tty: true
so it'll look like
version: '3'
services:
web:
tty: true
Hopefully this helps someone; thumps up if it helps you :)