Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose --project-directory project up not working as expected #6310

Closed
benjefferies opened this issue Oct 31, 2018 · 2 comments
Milestone

Comments

@benjefferies
Copy link

@benjefferies benjefferies commented Oct 31, 2018

Description of the issue

This issue relates to changes introduced by /pull/6134

The understanding is that --project-directory will allow you run start up a docker-compose from another directory by specifying the 'project directory'. The understanding is that it will also load the .env file within that directory.

This pull request is only included in the latest release so ensure you're using docker-compose from docker/compose@1.23.0-rc3 (release).

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.23.0-rc3, build ea3d406e
docker-py version: 3.5.0
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.1.0h  27 Mar 2018

Output of docker version

Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:21:31 2018
 OS/Arch:           darwin/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:29:02 2018
  OS/Arch:          linux/amd64
  Experimental:     true

Output of docker-compose config
(Make sure to add the relevant -f and other flags)

services:
  java:
    command: java -version
    image: java:alpine
version: '3.1'

Steps to reproduce the issue

  1. Clone https://github.com/benjefferies/docker-compose-project-directory
  2. Run docker-compose --project-directory docker up or docker-compose --project-directory docker -f docker/docker-compose.yml up

Observed result

Docker container does not run

Expected result

docker container to run using .env within the docker directory

Stacktrace / full error message

ERROR:
WARNING: The TAG variable is not set. Defaulting to a blank string.
ERROR: no such image: java:: invalid reference format

Additional information

See README.md in https://github.com/benjefferies/docker-compose-project-directory

@shin-

This comment has been minimized.

Copy link
Contributor

@shin- shin- commented Oct 31, 2018

Thanks for the report, and repro case, we'll look into it!

@mmisztal1980

This comment has been minimized.

Copy link

@mmisztal1980 mmisztal1980 commented Jul 15, 2019

@shin- I seem to be running into this again:

D:\Checkout\@cloud-technologies\core-pkg (feature/157 -> origin)
λ docker-compose --verbose --project-directory .\.docker\core-local-infrastructure\ up
compose.config.config.find: Using configuration files: .\docker-compose.yml,.\docker-compose.override.yml
docker.utils.config.find_config_file: Trying paths: ['C:\\Users\\mmisztal\\.docker\\config.json', 'C:\\Users\\mmisztal\\.dockercfg']
docker.utils.config.find_config_file: Found file at path: C:\Users\mmisztal\.docker\config.json
docker.auth.load_config: Found 'auths' section
docker.auth.parse_auth: Auth data for cloudtechnologies.azurecr.io is absent. Client might be using a credentials store instead.
docker.auth.load_config: Found 'credsStore' section
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/version HTTP/1.1" 200 549
compose.cli.command.get_client: docker-compose version 1.22.0, build f46880fe
docker-py version: 3.4.1
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.0.2o  27 Mar 2018
compose.cli.command.get_client: Docker base_url: http+docker://localnpipe
compose.cli.command.get_client: Docker version: Platform={'Name': ''}, Components=[{'Name': 'Engine', 'Version': '18.06.1-ce', 'Details': {'ApiVersion': '1.38', 'Arch': 'amd64', 'BuildTime': '2018-08-21T17:29:02.000000000+00:00', 'Experimental': 'false', 'GitCommit': 'e68fc7a', 'GoVersion': 'go1.10.3', 'KernelVersion': '4.9.93-linuxkit-aufs', 'MinAPIVersion': '1.12', 'Os': 'linux'}}], Version=18.06.1-ce, ApiVersion=1.38, MinAPIVersion=1.12, GitCommit=e68fc7a, GoVersion=go1.10.3, Os=linux, Arch=amd64, KernelVersion=4.9.93-linuxkit-aufs, BuildTime=2018-08-21T17:29:02.000000000+00:00
compose.cli.verbose_proxy.proxy_callable: docker info <- ()
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/info HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker info -> {'Architecture': 'x86_64',
 'BridgeNfIp6tables': True,
 'BridgeNfIptables': True,
 'CPUSet': True,
 'CPUShares': True,
 'CgroupDriver': 'cgroupfs',
 'ClusterAdvertise': '',
 'ClusterStore': '',
 'ContainerdCommit': {'Expected': '468a545b9edcd5932818eb9de8e72413e616e86e',
                      'ID': '468a545b9edcd5932818eb9de8e72413e616e86e'},
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=core-local-infrastructure', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dcore-local-infrastructure%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=corelocalinfrastructure', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dcorelocalinfrastructure%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.parallel.feed_queue: Pending: set()
Attaching to

The core-local-infrastructure folder contains 2 valid docker-compose*.yml files. No containers are being started when --project-dir is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.