I am trying to run application by using docker-compose build
command after pulling the image from docker using docker pull ajitgoel/socialmediascrubber
command. I am however getting a
Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?
error. Running the ls | grep *compose.yml
ls | grep *compose.yml
also does not return any results. What am I missing?
root@docker-socialmediascrubber:/# docker pull ajitgoel/socialmediascrubber
Using default tag: latest
latest: Pulling from ajitgoel/socialmediascrubber
Digest: sha256:f34ec5b1e8151c6ed12a02eba06c63f847a858e13f6e68eeae3ebf40bf7c7e04
Status: Image is up to date for ajitgoel/socialmediascrubber:latest
root@docker-socialmediascrubber:/# ls -ltr
total 88
drwxr-xr-x 2 root root 4096 Apr 24 2018 home
drwxr-xr-x 2 root root 4096 Jun 17 22:51 srv
drwxr-xr-x 2 root root 4096 Jun 17 22:51 mnt
drwxr-xr-x 2 root root 4096 Jun 17 22:51 media
drwxr-xr-x 10 root root 4096 Jun 17 22:51 usr
drwxr-xr-x 2 root root 4096 Jun 17 22:51 lib64
drwx------ 2 root root 16384 Jun 17 22:55 lost+found
drwxr-xr-x 13 root root 4096 Jun 20 13:54 var
drwxr-xr-x 22 root root 4096 Jun 25 14:55 lib
drwxr-xr-x 2 root root 12288 Jun 25 14:57 sbin
drwxr-xr-x 2 root root 4096 Jul 12 03:13 snap
drwxr-xr-x 3 root root 4096 Jul 12 03:13 opt
drwxr-xr-x 2 root root 4096 Jul 13 06:33 bin
lrwxrwxrwx 1 root root 30 Aug 15 06:39 vmlinuz.old -> boot/vmlinuz-4.15.0-55-generic
lrwxrwxrwx 1 root root 30 Aug 15 06:39 vmlinuz -> boot/vmlinuz-4.15.0-58-generic
lrwxrwxrwx 1 root root 33 Aug 15 06:39 initrd.img.old -> boot/initrd.img-4.15.0-55-generic
lrwxrwxrwx 1 root root 33 Aug 15 06:39 initrd.img -> boot/initrd.img-4.15.0-58-generic
drwxr-xr-x 4 root root 4096 Aug 16 06:16 boot
drwx------ 6 root root 4096 Aug 25 15:58 root
dr-xr-xr-x 92 root root 0 Aug 25 15:59 proc
drwxr-xr-x 17 root root 3740 Aug 25 15:59 dev
drwxr-xr-x 27 root root 960 Aug 25 16:23 run
drwxr-xr-x 94 root root 4096 Aug 25 16:24 etc
dr-xr-xr-x 13 root root 0 Aug 25 16:32 sys
drwxrwxrwt 9 root root 4096 Aug 25 17:24 tmp
Docker-compose.yml file:
version: '3.4'
volumes:
pgdata:
networks:
frontend:
backend:
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: <SomeStrongPassword>
POSTGRES_DB: scrubber
POSTGRES_USER: postgres
volumes:
- pgdata:/var/lib/postgresql/data
networks:
backend:
adminer:
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- db
networks:
backend:
scrubber:
image: ${DOCKER_REGISTRY-}scrubber
environment:
- ASPNETCORE_ENVIRONMENT=PRODUCTION
build:
context: .
dockerfile: Dockerfile
networks:
frontend:
backend:
depends_on:
- db
ports:
- 80:80
- 443:443
The error you are seeing is a docker-compose
error when it cannot find the docker-compose.yml
file.
Not sure why you are showing the ls
output - but if it is the output of the same folder you are running from, then you can also see there is no docker-compose.yml
file.
There is no need to do docker pull
prior to running any docker-compose
command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.