konveyor / move2kube

Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.
https://move2kube.konveyor.io/
Apache License 2.0
383 stars 118 forks source link

Support the ".env" file in move2kube #139

Closed Akash-Nayak closed 5 months ago

Akash-Nayak commented 3 years ago

move2kube translate does not support the .env file while parsing the docker-compose.yaml file. It returns an error-

Error while loading docker compose config : 1 error(s) decoding:

* error decoding 'Ports': No port specified: :<empty> 
ERRO[0009] Unable to parse docker compose file dock-com/docker-compose.yaml using *compose.V3Loader : 1 error(s) decoding:

* error decoding 'Ports': No port specified: :<empty> 

The below files can be used to reproduce the error.

# this is the docker-compose.yaml file
version: '3.4'
services:
    goodbot:
        image: python
        env_file:
            - .env
        ports:
            - ${PORT}:${PORT}
# this is .env file
PORT=123

(kompose convert also has similar issue- https://github.com/kubernetes/kompose/issues/1289)

kkashyap1707 commented 1 year ago

Any update on this issue?

I am facing the same issue.

`FATA Unable to load files: 1 error(s) decoding:

HarikrishnanBalagopal commented 5 months ago

@kkashyap1707 The original issue is from a much older version of Move2Kube v0.1.0 and v0.2.0 which had the move2kube translate command. It has been replaced by the transform command https://move2kube.konveyor.io/tutorials/cli

Feel free to create a new issue if this is still relevant in the latest v0.3.x versions of Move2Kube.