{"id":15779962,"url":"https://github.com/rgl/windows-docker-compose-example","last_synced_at":"2026-05-04T10:40:23.123Z","repository":{"id":139753703,"uuid":"185879795","full_name":"rgl/windows-docker-compose-example","owner":"rgl","description":"example on how to start a docker compose environment in a (remote) docker host","archived":false,"fork":false,"pushed_at":"2023-12-16T13:23:12.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T11:06:21.433Z","etag":null,"topics":["docker","docker-compose","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-09T22:25:08.000Z","updated_at":"2023-12-16T13:23:40.000Z","dependencies_parsed_at":"2023-12-16T14:00:46.550Z","dependency_job_id":null,"html_url":"https://github.com/rgl/windows-docker-compose-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fwindows-docker-compose-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fwindows-docker-compose-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fwindows-docker-compose-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fwindows-docker-compose-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/windows-docker-compose-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246492478,"owners_count":20786375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","windows"],"created_at":"2024-10-04T18:22:05.115Z","updated_at":"2026-05-04T10:40:23.073Z","avatar_url":"https://github.com/rgl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n[![Build](https://github.com/rgl/windows-docker-compose-example/actions/workflows/build.yml/badge.svg)](https://github.com/rgl/windows-docker-compose-example/actions/workflows/build.yml)\n\nThis is an example on how to start a docker compose environment in a (remote) docker host.\n\n**NB** This is similar to [rgl/ubuntu-docker-compose-example](https://github.com/rgl/ubuntu-docker-compose-example).\n\n## Usage\n\n```bash\n# if required, set the DOCKER_HOST environment variable.\n# this make the docker client use this dockerd.\n# NB you must start dockerd with -H tcp://0.0.0.0:2375\n#export DOCKER_HOST=tcp://localhost:2375\n\n# create the environment defined in docker-compose.yml\n# and leave it running in the background.\ndocker compose up --build -d\n\n# show running containers.\ndocker compose ps\n\n# execute command inside the containers.\ndocker compose exec -T etcd etcd --version\ndocker compose exec -T etcd etcdctl version\ndocker compose exec -T etcd etcdctl endpoint health\ndocker compose exec -T etcd etcdctl put foo bar\ndocker compose exec -T etcd etcdctl get foo\n\n# get the allocated hello port and create an endpoint url based in\n# the DOCKER_HOST environment variable host.\nhello_endpoint=\"$(\npython \u003c\u003c'EOF'\nimport os\nimport urllib.parse\nimport subprocess\n\np = subprocess.Popen(\n    ['docker', 'compose', 'port', 'hello', '8888'],\n    text=True,\n    stdout=subprocess.PIPE,\n    stderr=subprocess.STDOUT)\nstdout, stderr = p.communicate()\nif 'DOCKER_HOST' in os.environ:\n    docker_host_ip_address = urllib.parse.urlparse(os.environ['DOCKER_HOST']).netloc.split(':')[0]\n    hello_port = stdout.strip().split(':')[-1]\n    hello_endpoint = f'http://{docker_host_ip_address}:{hello_port}'\nelse:\n    hello_endpoint = f'http://{stdout.strip()}'\nprint(hello_endpoint)\nEOF\n)\"\n\n# invoke the hello endpoint.\nwget -qO- $hello_endpoint\n\n# show logs.\ndocker compose logs\n\n# destroy the environment.\ndocker compose down --volumes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fwindows-docker-compose-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fwindows-docker-compose-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fwindows-docker-compose-example/lists"}