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 convert should validate dockerfilepath #594

Closed
ashetty1 opened this issue May 10, 2017 · 2 comments · Fixed by #609
Closed

kompose convert should validate dockerfilepath #594

ashetty1 opened this issue May 10, 2017 · 2 comments · Fixed by #609
Assignees
Labels
component/OpenShift kind/bug Categorizes issue or PR as related to a bug.

Comments

@ashetty1
Copy link
Contributor

ashetty1 commented May 10, 2017

Would it be possible for dockerfilepath to be validated with kompose convert on OpenShift? Suppose an absolute path is provided instead of relative path, it gets detected only with oc create.

docker-compose file here:

version: "2"

services:
 foo:
  build:
   context: "../../script/test_in_openshift/buildconfig"
   dockerfile: "/Dockerfile"
  command: "sleep 120"

...

$ kompose version
0.6.0 (ebd9dcf)

$ kompose --provider=openshift -f examples/buildconfig/docker-compose.yml convert -o /tmp/bc2
INFO Buildconfig using https://github.com/kubernetes-incubator/kompose.git::master as source.

$ oc create -f /tmp/bc2
Error from server: BuildConfig "foo" is invalid: spec.strategy.dockerStrategy.dockerfilePath: Invalid value: "/Dockerfile": dockerfilePath must be a relative path within your source location
@surajssd
Copy link
Member

@ashetty1 yes this should be done, thanks for reporting!

@surajssd surajssd added component/OpenShift kind/bug Categorizes issue or PR as related to a bug. labels May 15, 2017
@surajnarwade
Copy link
Contributor

@surajssd @ashetty1 , I will take this up

surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 18, 2017
This PR will resolve kubernetes#594 by validating dockerfilepath based on whether
it is relative path or not.
surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 18, 2017
This PR will resolve kubernetes#594 by validating dockerfilepath based on whether
it is relative path or not.
surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 24, 2017
This PR will resolve kubernetes#594 by validating dockerfilepath based on whether
it is relative path or not.
surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 30, 2017
This PR will resolve kubernetes#594 by validating dockerfilepath based on whether
it is relative path or not.
surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 30, 2017
This PR will resolve kubernetes#594 by validating dockerfilepath based on whether
it is relative path or not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/OpenShift kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants