if random docker-compose file is not present --file option does not work #8
Closed
Description
I found out, that even though we use the --file
option, we still need to have a somewhat valid docker-compose file present.
sebair: kompose2 (master)$ cat docker-compose.yml
toto:
image: toto
sebair: kompose2 (master)$ cat mongo.yml
mongo:
image: mongo
sebair: kompose2 (master)$ ./kompose convert -f mongo.yml --stdout
{
"kind": "ReplicationController",
"apiVersion": "v1",
"metadata": {
"name": "mongo",
"creationTimestamp": null,
"labels": {
"service": "mongo"
if you remove the docker-compose file:
$ ./kompose convert -f mongo.yml --stdout
ERRO[0000] Failed to find docker-compose.yml
FATA[0000] Failed to read project: open docker-compose.yml: no such file or directory