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

Cannot locate specified Dockerfile: Dockerfile #809

Closed
ylogx opened this issue Sep 6, 2017 · 7 comments
Closed

Cannot locate specified Dockerfile: Dockerfile #809

ylogx opened this issue Sep 6, 2017 · 7 comments
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@ylogx
Copy link

ylogx commented Sep 6, 2017

When I run kompose up, I get the following error:

FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service business-api: Unable to build image. For more output, use -v or --verbose when converting.: API error (500): {"message":"Cannot locate specified Dockerfile: Dockerfile"}

My folder structure is:

repo 
  package
    business-api
        Dockerfile

My docker-compose.yaml is:

version: '2'

services:
  business-api:
    restart: always
    build: ./package/business_api
    image: index.docker.io/company/business-api
    volumes:
      - ./:/usr/src/app:ro
      - ./data:/root/data:ro
    depends_on:
      - some-other-service
@cdrage
Copy link
Member

cdrage commented Sep 6, 2017

Hmm, may be a bug with the pathing, you may have to manually specify by doing: ./package/business_api/Dockerfile under build.

Try that with the --verbose output and let post the debug information here!

@cdrage cdrage self-assigned this Sep 6, 2017
@ylogx
Copy link
Author

ylogx commented Sep 7, 2017

Added full path in build -> dockerfile:

    build:
      context: ./package/business_api
      dockerfile: ./package/business_api/Dockerfile

Output of sudo kompose up -v 1000:

DEBU Docker Compose version: 2
DEBU Opening compose files: docker-compose.yml
DEBU [0/0] [webapp_npm]: EventType: 31
DEBU [0/0] [webapp_build]: EventType: 31
DEBU [0/0] [webapp_config]: EventType: 31
DEBU [0/0] [webapp_node_modules]: EventType: 31
DEBU [0/1] [nginx]: Adding
DEBU [0/5] [webapp]: Adding
DEBU [0/5] [business-api]: Adding
DEBU [0/6] [default]: EventType: 32
DEBU [0/6] [default]: EventType: 32
DEBU [0/6] [default]: EventType: 32
DEBU [0/6] [default]: EventType: 32
DEBU [0/6] [default]: EventType: 32
DEBU Default network found
DEBU [0/6] [default]: EventType: 32
WARN Unsupported root level volumes key - ignoring
WARN Unsupported depends_on key - ignoring
INFO Build key detected. Attempting to build and push image 'index.docker.io/example/business-api'
DEBU Compose file dir: /home/user/project
INFO Building image 'index.docker.io/example/business-api' from directory 'business_api'
DEBU Created temporary file /tmp/kompose-image-build-853848623 for Docker image tarballing
FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service business-api: Unable to build image. For more output, use -v or --verbose when converting.: API error (500): {"message":"Cannot locate specified Dockerfile: Dockerfile"}

This is the same output that I get when build->dockerfile is not specified as shown in the original issue at the top.

@cdrage
Copy link
Member

cdrage commented Sep 7, 2017

@shubhamchaudhary I'll investigate! Side-note: Why do you add 1000 to the sudo kompose up -v command?

@ylogx
Copy link
Author

ylogx commented Sep 7, 2017

@cdrage I thought it is --verbose parameterized (which it isn't now that I check --help). I added 1000 as the log level value in my head.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 4, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 9, 2018
@cdrage cdrage closed this as completed Feb 13, 2018
@hangyan
Copy link
Contributor

hangyan commented Dec 28, 2019

fixed by #1212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants