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

Kompose doesn't find dockerfile with context . #944

Closed
BenderV opened this issue Feb 15, 2018 · 5 comments · Fixed by #946 or #1212
Closed

Kompose doesn't find dockerfile with context . #944

BenderV opened this issue Feb 15, 2018 · 5 comments · Fixed by #946 or #1212
Labels
priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@BenderV
Copy link

BenderV commented Feb 15, 2018

I think I have find two errors:

1 - kompose us searching for context related to directory from where it is run, not from where docker-compose.yml file is located

kompose up -f docker/docker-compose-dev.yml -v
FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service backend-server: ../server is not a valid path for building image backend-server. Check if this dir exists.: stat ../server: no such file or directory

2 - kompose fail to look for dockerfile (if the context is not in a subdirectory ?) -- could be related: #809 & #832

Error: {"message":"Cannot locate specified Dockerfile: Dockerfile"}

Note that docker-compose work well here.

Structures

docker/ -- docker-compose files
   docker-compose-dev.yml 
server/ -- back-end
web/ -- front-end

docker-compose-dev.yml

version: '3'

services:
  backend-server:
    image: backend-server:dev
    build:
      context: ../server
      dockerfile: Dockerfile
    volumes:
      - ../templates:/usr/src/templates
    env_file:
      - ../docker_env.list
    ports:
      - 5000:4000

  front-end:
    image: front-end:dev
    build:
      context: ../web
      dockerfile: Dockerfile
    volumes:
      - ../web/src:/usr/src/web/src
      - ../web/config:/usr/src/web/config
      - ../web/build:/usr/src/web/build
      - ../web/static:/usr/src/web/static
    env_file:
      - ../docker_env.list
    ports:
      - 8080:8080
    depends_on:
      - backend-server
@cdrage
Copy link
Member

cdrage commented Feb 20, 2018

Hey there! There was some effort pushed towards fixing this for build, but the contributor refused to sign the CLA. I believe the same / similar code could be created for using context.

But yes, this is currently a problem.

@akin-ozer
Copy link

akin-ozer commented Mar 17, 2019

checked #946 but this issue still exists, docker-compose.yml can't find Dockerfile. 'docker-compose build' is working but 'kompose up' doesn't build. It might be caused from relative pathing but it should work with them.

Edit: kompose v1.18 seems working

@lucasfonsecads
Copy link

Don't work for me the kompose v1.18

@jrflga
Copy link

jrflga commented Jul 30, 2019

1.18 not working

@jsanko9
Copy link

jsanko9 commented Oct 28, 2019

1.19 not working

@cdrage cdrage reopened this Oct 31, 2019
@cdrage cdrage added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Oct 31, 2019
@hangyan hangyan mentioned this issue Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants