0

My docker-compose YAML configuration is made by

version: '3'
services:
  nginx:
    image: https://my-git-address.git#:dockers/nginx-dev
    ports:
      - 80:80
      - 443:443
    networks:
      dev-net:
        aliases:
          - app.dev.local
          - dev.local
    extra_hosts:
      - "foo.dev.local:127.0.0.1"

but composing fails with the message:

λ docker-compose up
Creating network "application_dev-net" with driver "bridge"
ERROR: no such image: https://my-git-address.git#:dockers/nginx-dev: invalid reference format

But it's kind of strange because when I use the same URL address to Git repository for building Docker image all goes well.

λ docker build --rm --compress --tag app/docker-nginx-poc https://my-git-address.git#:dockers/nginx-dev
Sending build context to Docker daemon  23.57kB
Step 1/11 : FROM phusion/baseimage:0.10.2
---> 4ca439e72536

...

---> 30a38f4f0d38
Successfully built 30a38f4f0d38
Successfully tagged app/docker-nginx-poc:latest

Any thought?

1
  • 1
    Well it isn't strange... that address isn't an image Commented Jan 11, 2019 at 16:15

1 Answer 1

1

Git URL must not be set as image value, but rather as build value :

version: '3'
services:
  nginx:
    build: https://my-git-address.git#:dockers/nginx-dev
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.