-
Notifications
You must be signed in to change notification settings - Fork 770
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
Image name not given still kompose does not errors out #92
Comments
is there a way to validate the docker-compose file with lib compose ? |
@Runseb : $ cat docker-compose.yml
web:
links:
- redis
redis:
$ docker-compose up
ERROR: The Compose file is invalid because:
Service web has neither an image nor a build context specified. At least one must be provided. |
Found it. @surajssd you will see |
@ngtuna thanks for that pointer :-) |
@ngtuna now when I started working on this, looks like function |
Also with libcompose I found this thing: [vagrant@fedora tmp]$ cat docker-compose.yml
version: "2"
services:
mariadb:
ports:
- 3306 somehow the docker-compose warning is not what I get [vagrant@fedora tmp]$ libcompose up
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose)
INFO[0000] [0/1] [mariadb]: Starting
ERRO[0000] Failed Starting mariadb : Error: No such image: tmp_mariadb
ERRO[0000] Failed to start: mariadb : Error: No such image: tmp_mariadb
Error: No such image: tmp_mariadb Using following libcompose version $ libcompose version
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose)
Version: 0.3.0-dev (HEAD)
Go version: go1.6.3 It didn't tell me that I have not put image name! |
But for a docker-compose file of v1 like this [vagrant@fedora tmp]$ cat docker-compose.yml
mariadb:
ports:
- 3306 I get errors similar to docker-compose [vagrant@fedora tmp]$ libcompose up
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose)
ERRO[0000] Could not parse config for project tmp : Service 'mariadb' has neither an image nor a build path specified. Exactly one must be provided.
FATA[0000] Failed to read project: Service 'mariadb' has neither an image nor a build path specified. Exactly one must be provided. |
Filed issue in libcompose docker/libcompose#357 |
@surajssd @ngtuna looks like lib compose now got validation for v2 docker/libcompose#371 We should try to close this. |
Well yeah, upgrade libcompose will help solving couple of problems. |
@ngtuna sure, go ahead |
closed via #195 |
@ngtuna this is issue is not fixed yet! |
docker-compose file $ cat docker-compose-no-image.yml
version: "2"
services:
mariadb:
ports:
- 3306
etherpad:
ports:
- "80:9001" output $ kompose -f docker-compose-no-image.yml convert --stdout -y
apiVersion: v1
items:
- apiVersion: v1
kind: Service
[SNIP]
loadBalancer: {}
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: mariadb
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
service: mariadb
spec:
containers:
- name: mariadb
ports:
- containerPort: 3306
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: etherpad
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
service: etherpad
spec:
containers:
- name: etherpad
ports:
- containerPort: 9001
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
kind: List
metadata: {} |
Oh you're right. Thanks @surajssd good catch. If that's compose version 1, kompose worked. But it seems does not work on version 2. Let me check. |
@ngtuna any news on this. |
@sebgoa it's still there. Just tested with libcompose HEAD. Let me just tackling it directly without libcompose. |
This issue just be solved in libcompose docker/libcompose#415. Will check that piece of code shortly. |
This commit updates libcompose in order to merge in docker/libcompose#423 which affected kubernetes#92 by not erroring out when an image name wasn't provided. Closes kubernetes#92 As well as knocks out the last required milestone for a 0.2.1 release https://github.com/kubernetes-incubator/kompose/milestone/2
This commit updates libcompose in order to merge in docker/libcompose#423 which affected kubernetes#92 by not erroring out when an image name wasn't provided. Closes kubernetes#92 As well as knocks out the last required milestone for a 0.2.1 release https://github.com/kubernetes-incubator/kompose/milestone/2
This commit updates libcompose in order to merge in docker/libcompose#423 which affected kubernetes#92 by not erroring out when an image name wasn't provided. Closes kubernetes#92 As well as knocks out the last required milestone for a 0.2.1 release https://github.com/kubernetes-incubator/kompose/milestone/2
Using docker-compose file that has no field for image, so this should error out, but this still works.
output
The text was updated successfully, but these errors were encountered: