I'm doing a docker-compose.yml with the following content, but the result is an exited code 1.
web:
image: ubuntu
Trying another image works, but less with ubuntu or debian
I'm doing a docker-compose.yml with the following content, but the result is an exited code 1.
web:
image: ubuntu
Trying another image works, but less with ubuntu or debian
I am not sure that the content is appropriate for the compose, you must declare a version and web
should be within the services
section. Therefore, the content of your file should look something like this:
version: '2'
services:
web:
image: ubuntu
Then try doing the build
:
$ docker-compose build
You need to add the version to .yaml
and the type of service. For an image of ubuntu
would be something like this:
version: 3
services:
ubuntu:
image: ubuntu:rolling