move2kube icon indicating copy to clipboard operation
move2kube copied to clipboard

Support the ".env" file in move2kube

Open Akash-Nayak opened this issue 4 years ago • 0 comments

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)

Akash-Nayak avatar Oct 29 '20 12:10 Akash-Nayak