Skip to content

Support .env file for docker compose #95

Description

@TJM

Similar to #44 I think, but maybe the situation is different 2 years later?

I am trying to convert https://github.com/jfrog/artifactory-docker-examples/tree/master/docker-compose/xray

$ container-transform -i compose -o marathon xray.yml
Traceback (most recent call last):
(SNIP)
ValueError: invalid literal for int() with base 10: '$XRAY_SERVER_PORT'

Apparently they are using the ".env" file as per https://docs.docker.com/compose/environment-variables/#the-env-file

It seems like container-transform would need to parse the compose file the same way docker compose does to produce the same results?

I tried appending the variables to the "docker-compose.yaml" (xray.yml) file, but the results were not positive either.

$ echo '' >> xray.yml # add a newline to the end of the file
$ sed -e 's/=/: /' .env >> xray.yml

... same error :(

~tommy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions