1

I've copied a docker-compose.yml from github with the following:

version: '3' 

services:
  db:
    image: postgres:12-alpine
    restart: always
    volumes:
      - nextcloud-db:/var/lib/postgresql/data
    env_file:
      - db.env 

  app:
    build: ./nextcloud-cron
    restart: always
    volumes:
      - nextcloud-data:/var/www/html
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=xxx
      - LETSENCRYPT_HOST=xxx
      - LETSENCRYPT_EMAIL=xxx
      - POSTGRES_HOST=xxx
      - POSTGRES_DB=xxx
      - NEXTCLOUD_OVERWRITEPROTOCOL=https
      - NEXTCLOUD_ADMIN_USER=xxx
      - NEXTCLOUD_ADMIN_PASSWORD=xxx
   
    env_file:
      - db.env
    depends_on:
      - db
    networks:
      - nextcloud-proxy-tier
      - default 

  proxy:
    build: ./proxy
    restart: always
    ports:
      - 7080:80
      - 7443:443
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - nextcloud-proxy-certs:/etc/nginx/certs:ro
      - nextcloud-proxy-vhost.d:/etc/nginx/vhost.d
      - nextcloud-proxy-html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
    networks:
      - nextcloud-proxy-tier 

  letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    volumes:
      - nextcloud-proxy-certs:/etc/nginx/certs
      - nextcloud-proxy-vhost.d:/etc/nginx/vhost.d
      - nextcloud-proxy-html:/usr/share/nginx/html
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - nextcloud-proxy-tier
    depends_on:
      - proxy 

  collabora:
    image: collabora/code
    restart: always
    networks:
      - nextcloud-proxy-tier
    depends_on:
      - proxy
    cap_add:
     - MKNOD
    ports:
      - 127.0.0.1:9980:9980
    environment:
      # IMPORTANT: Note the backslashs before the dots here (and only here)!
      - domain=xxx
      - username=xxx
      - password=xxx
      - VIRTUAL_HOST=xxx
      - VIRTUAL_NETWORK=nextcloud-proxy-tier
      - VIRTUAL_PORT=9980
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
      - LETSENCRYPT_HOST=xxx 

volumes:
  nextcloud-db:
  nextcloud-data:
  nextcloud-proxy-certs:
  nextcloud-proxy-vhost.d:
  nextcloud-proxy-html: 

networks:
  nextcloud-proxy-tier:

and everytime I try to run

docker-compose build --pull

I get this error message:

Building app
ERROR: Cannot locate specified Dockerfile: Dockerfile

Has anyone a clue what the problem is?!

Thanks

2
  • perhaps you didn't copy the Dockerfile - or the whole nextcloud-cron and proxy folders from that repository - you need ALL the files from https://github.com/bentolor/docker-nextcloud-collabora-postgresql-letsencrypt -
    – Bravo
    Sep 19, 2021 at 1:17
  • This question isn't relevant to Raspberry Pi. Nothing about your issue is specific to Raspberry Pis, it's just about Docker, which I assume you are running on an RPi, but your question doesn't even specify that. Try re-asking on SuperUser or something.
    – Xbox One
    Apr 9, 2023 at 21:38

2 Answers 2

0

You have already answered your Problem

ERROR: Cannot locate specified Dockerfile: Dockerfile

Composer Pull cannot locate the Dockerfile.

The Question is from where do you run this command? According to the official documentation you have to run the command in your Project dir enter image description here

https://docs.docker.com/compose/gettingstarted/

The Yaml file looks valid so far as i can tell. enter image description here I imagine you are in the wrong directory

0

As @Phong mentioned, you may be in a different directory than the location of your Dockerfile since docker can't find it. Another reason could be that your Dockerfile is not named "Dockerfile" and you are actually in the right directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.