Docker Community Forums

Share and learn in the Docker community.

"ERROR: build path /srv/http/revProxy either does not exist, is not accessible, or is not a valid URL" Although it does exist, is accessible and contains a Dockerfile

Around last week I updated my system (Arch Arm on raspberry pi using pacman -Syu ) and after that update every time I try to run docker-compose up -d I get :

ERROR: build path /srv/http/revProxy either does not exist, is not accessible, or is not a valid URL.

Although I have built the relevant image along with all the others specified in this docker-compose.yml file multiple times over the last year without issue.
I can assure you the directory exists and contains a Dockerfile so I’m unsure as to what is going on. Also there are other container builds specified in the same docker-compose.yml file albeit with different build contexts not sure if that makes any difference.

The portion that I assume is generating this issue is :

version: "3.8"

services:

  reverse-proxy:
    container_name: reverseProxy
    build:
      context: ../http/revProxy/
      dockerfile: Dockerfile
    ports: 
      - "192.168.1.254:80:80"
      - "192.168.1.254:443:443"
    volumes:
      - "../http/revProxy/httpd.conf:/usr/local/apache2/conf/httpd.conf" 
      - "../http/revProxy/httpd-vhosts.conf:/usr/local/apache2/conf/extra/httpd-vhosts.conf:ro"
      - "../http/revProxy/SSLCerts/fullchain.pem:/usr/local/apache2/conf/server.crt:ro"
      - "../http/revProxy/SSLCerts/privkey.pem:/usr/local/apache2/conf/server.key:ro"
    restart: always
    networks:
      default:
        ipv4_address: 172.16.0.8
      myothernetwork_default:
        ipv4_address: 182.16.0.5

Please, use the code block (</>) button instead of block quotes () when you insert codes, especially yaml codes which is really common in the Docker world. I fixed your post so the indentations work and the source paths in the volume section don’t start with three dots instead of two.

When you updated your system was Docker updated too? Is it possible that the new version runs behalf of an other user? Exactly from which directory do you try to run docker-compose?

Have you tried to mount that folder using docker cli directly instead of docker compose?