If docker is installed on snap, docker-compose will not find docker-compose.yml except under the home directory

Asked 2 years ago, Updated 2 years ago, 171 views

OS:ubuntu 18.04 LTS

If you install docker on snap, you can create a directory under the root directory, place docker-compose.yml, and do docker-compose up with the following error:
The directory under the home directory can run properly.
Does anyone know the cause or solution?

ERROR: 
        Can't find a sustainable configuration file in this directory or any
        parent.Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

Specifically, each hoge directory has docker-compose.yml, and the above error appears below, but

$sudomdkir/hoge
$ cd/hoge
$ sudo docker-compose up

You can do it below.

$mkdir~/hoge
$ cd to /hoge
$ sudo docker-compose up

ubuntu docker docker-compose

2022-09-30 21:48

2 Answers

Similar events have been reported here:

The workaround is to use manual installation instead of using docker-compose installed in snap.


2022-09-30 21:48

The second step is

$mkdir~/hoge
$ cd/hoge

I feel strange here.The directories are different, so the references are different...


2022-09-30 21:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.