I
I
Igor2021-04-15 17:52:16
Docker
Igor, 2021-04-15 17:52:16

What is the problem with docker-compose build?

Greetings, colleagues
Tell me this question
docker-compose build up -d

ERROR: build path /opt/kkk/dockers/registry.gitlab.com/testapp/services/dockers/dockers:latest either does not exist, is not accessible, or is not a valid URL.

How to solve this problem?
docker-compose.yml
version: '3.6'

services:
  testapplication:
   build: registry.gitlab.com/testapp/services/dockers/dockers:latest 
   restart: always
   ports:
      - 7070:7070

networks:
  default:
    external:
      name: testapplication

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2021-04-16
@whitegtr

the problem was due to incorrect syntax in docker-compose.yml
documentation
https://docs.docker.com/compose/compose-file/compo...
defines the buid element as
build
Configuration options that are applied at build time.
build can be specified either as a string containing a path to the build context:

services:
  webapp:
    build: ./path

build:
      context: .
      dockerfile: Dockerfile

in the problem file on the right side there was a link to the base image
build: registry.gitlab.com/testapp/services/dockers/dockers:latest

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question