{"action":"created","issue":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/368","repository_url":"https://api.github.com/repos/testcontainers/testcontainers-java","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/368/comments","events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/368/events","html_url":"https://github.com/testcontainers/testcontainers-java/issues/368","id":235488604,"node_id":"MDU6SXNzdWUyMzU0ODg2MDQ=","number":368,"title":"Use .withEnv on DockerComposeContainer won't work as expected","user":{"login":"mbuccini","id":21307117,"node_id":"MDQ6VXNlcjIxMzA3MTE3","avatar_url":"https://avatars0.githubusercontent.com/u/21307117?v=4","gravatar_id":"","url":"https://api.github.com/users/mbuccini","html_url":"https://github.com/mbuccini","followers_url":"https://api.github.com/users/mbuccini/followers","following_url":"https://api.github.com/users/mbuccini/following{/other_user}","gists_url":"https://api.github.com/users/mbuccini/gists{/gist_id}","starred_url":"https://api.github.com/users/mbuccini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbuccini/subscriptions","organizations_url":"https://api.github.com/users/mbuccini/orgs","repos_url":"https://api.github.com/users/mbuccini/repos","events_url":"https://api.github.com/users/mbuccini/events{/privacy}","received_events_url":"https://api.github.com/users/mbuccini/received_events","type":"User","site_admin":false},"labels":[{"id":1107097160,"node_id":"MDU6TGFiZWwxMTA3MDk3MTYw","url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels/stale","name":"stale","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-13T09:18:40Z","updated_at":"2018-11-11T04:40:54Z","closed_at":null,"author_association":"NONE","body":"Hello everyone,\r\n\r\nI am trying to use testcontainers in a slightly different way than it's meant to be (i.e., not in unit tests). The reason behind this is that it's quite convenient to have testcontainers because docker-compose is already implemented and the project seems quite stable, so I don't see the point in creating a new wrapper. \r\n\r\nNow, I bumped into an issue which I wonder how can be solved in an easy manner. The following snippet shows how I plan to use test-containers:\r\n\r\n```        String containerId = UUID.randomUUID().toString().replace(\"-\", \"\");\r\n        DockerComposeContainer dockerComposeContainer = new DockerComposeContainer(containerId,\r\n                new File(\"project/build/resources/main/docker-compose.yml\"));\r\n\r\n        dockerComposeContainer.withEnv(\"MY_ENV_VARIABLE\", \"myValue\"));\r\n        dockerComposeContainer.withExposedService(getServiceName(), getPort());\r\n        dockerComposeContainer.starting(null); \r\n```\r\n\r\nHowever, I noticed that MY_ENV_VARIABLE is only set on the ambassador container (or compose, can't remember). I saw the source code of `org.testcontainers.containers.DockerComposeContainer`, and unfortunately I found out that:  \r\n\r\n``` \r\n    /**\r\n     * Properties that should be passed through to all Compose and ambassador containers (not\r\n     * necessarily to containers that are spawned by Compose itself)\r\n     */\r\n```\r\n\r\nI wonder, how do you do it? How would you set environment variables on the containers spawned by compose? Is there a way to force that? "},"comment":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/comments/437643431","html_url":"https://github.com/testcontainers/testcontainers-java/issues/368#issuecomment-437643431","issue_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/368","id":437643431,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzY0MzQzMQ==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-11T04:40:54Z","updated_at":"2018-11-11T04:40:54Z","author_association":"NONE","body":"This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the  issue if this is the case.\n"}}
{"actor":{"display_login":"stale"}}