{"action":"closed","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/3292","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/3292/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/3292/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/3292/events","html_url":"https://github.com/gogits/gogs/issues/3292","id":166559422,"number":3292,"title":"SOCAT_LINK does not work with docker embedded DNS","user":{"login":"ollin","id":706414,"avatar_url":"https://avatars.githubusercontent.com/u/706414?v=3","gravatar_id":"","url":"https://api.github.com/users/ollin","html_url":"https://github.com/ollin","followers_url":"https://api.github.com/users/ollin/followers","following_url":"https://api.github.com/users/ollin/following{/other_user}","gists_url":"https://api.github.com/users/ollin/gists{/gist_id}","starred_url":"https://api.github.com/users/ollin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollin/subscriptions","organizations_url":"https://api.github.com/users/ollin/orgs","repos_url":"https://api.github.com/users/ollin/repos","events_url":"https://api.github.com/users/ollin/events{/privacy}","received_events_url":"https://api.github.com/users/ollin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-20T11:28:46Z","updated_at":"2016-07-20T12:44:58Z","closed_at":"2016-07-20T12:44:58Z","body":"- Docker Image: gogs/gogs:0.9.46\r\n- Docker: 1.11.2\r\n- Gogs version 0.9.46.0717\r\n- git version 2.6.6\r\n\r\nHello,\r\n\r\nI'm using gogs in a docker-compose.yml file. I link postgres:\r\n\r\n```\r\n...\r\n  gogs:\r\n    image: gogs/gogs:0.9.46\r\n    container_name: gogs\r\n    ports:\r\n      - \"10080:3000\"\r\n    environment:\r\n      - SOCAT_LINK=true\r\n    volumes:\r\n      - gogs-data:/data\r\n    links:\r\n      - db\r\n...\r\n```\r\n\r\nbut socat is not used. I think the problem is, that since docker 1.10 docker is using an embedded DNS server and the links are not available as environment variables anymore.\r\n\r\nIf I go into the gogs container via exec, I can not found any environment variable which is needed by the logic inside the  [start.sh](https://github.com/gogits/gogs/blob/master/docker/start.sh#L21) script. ``$(env | sed -En ...``\r\n\r\n1.) I think this needs a fix.\r\n2.) Is there a workaround so that I can connect to postgres and not have the situation as described in #2015 \r\n\r\nEdit: \r\nI'm using docker compose v2 format.\r\n"}}
{"actor":{"display_login":"ollin"}}