I'm trying to run Ubuntu in the docker container. I use Dockerfile with contents:
FROM ubuntu:latest Or docker-compose.yml with the contents:
version: '3' services: ubuntu: image: ubuntu:18.04 ports: - 32769:80 volumes: - /var/www:/var/www I do at a minimum, I want to run and see that everything works. Try to enter the container itself.
But the problem is that the container does not start and lies in the list of stopped
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ea3715e0c4f7 docker-compose-ubuntu-latest_ubuntu "/bin/sh -c /bin/bash" 4 minutes ago Exited (0) 4 minutes ago docker-compose-ubuntu-latest_ubuntu_1 Tell me, please, what could be the problem? Just starting to study the docker, maybe doing something wrong.
Thank.
PS I tried to change the Dockerfile as follows:
FROM ubuntu RUN apt-get update RUN apt-get install apache2 -y RUN service apache2 start CMD /bin/bash but the container still does not start. I can not even understand what could be the problem. No errors, just does not start.
Through docker-compose, it turns out to launch a bunch of several ready-made images, but it’s impossible to launch something adequate.
-itSee more about these keys and will experiment further - Cuthbert_Allgood