{"id":26699009,"url":"https://github.com/darmiel/d2dc","last_synced_at":"2025-04-13T05:50:21.402Z","repository":{"id":43426302,"uuid":"346009870","full_name":"darmiel/d2dc","owner":"darmiel","description":"Small utility to convert `docker run [...]` to `docker-compose`","archived":false,"fork":false,"pushed_at":"2023-02-01T10:10:24.000Z","size":288,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T22:31:58.557Z","etag":null,"topics":["cli-app","docker","docker-compose","go","golang","hacktoberfest"],"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/darmiel.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}},"created_at":"2021-03-09T13:08:59.000Z","updated_at":"2024-08-10T20:56:36.000Z","dependencies_parsed_at":"2023-02-17T04:16:06.667Z","dependency_job_id":null,"html_url":"https://github.com/darmiel/d2dc","commit_stats":null,"previous_names":["darmiel/docker-compose-service-generator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fd2dc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fd2dc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fd2dc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fd2dc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darmiel","download_url":"https://codeload.github.com/darmiel/d2dc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670501,"owners_count":21142901,"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":["cli-app","docker","docker-compose","go","golang","hacktoberfest"],"created_at":"2025-03-26T22:26:58.813Z","updated_at":"2025-04-13T05:50:21.375Z","avatar_url":"https://github.com/darmiel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# d2dc\n**D**ocker **2** **D**ocker-**C**ompose\n\n![v](https://img.shields.io/github/v/tag/darmiel/d2dc?label=version)\n![r](https://goreportcard.com/badge/github.com/darmiel/d2dc)\n[![Test Go Build](https://github.com/darmiel/d2dc/actions/workflows/go-build.yml/badge.svg?branch=main)](https://github.com/darmiel/d2dc/actions/workflows/go-build.yml)\n\n---\n\nd2dc converts a `docker run`-command into a docker-compose service (see [example](#example)).\n![example-img](./assets/example.png)\n\n---\n\n* [Example](#example)\n* [Build](#build)\n    + [Prerequisites](#prerequisites)\n    + [Build](#build-1)\n* [Why?](#why-)\n\n---\n\n## Example\n\n**INPUT:**\n```bash\n$ docker run -it --rm --name ftp -p 21:21 -e \"HELLO=WORLD\" -v \"${PWD}/data\":/data myimage:latest\n```\n\n**OUTPUT:**\n```bash\nservices:\n  ftp:\n    image: myimage:latest\n    stdin_open: true\n    tty: true\n    environment:\n      HELLO: WORLD\n    volumes:\n    - ./data:/data\n    ports:\n    - \"21:21\"\n```\n\n## Installation\n\nIf you have Go installed, you can use the following command to get d2dc:\n\n```bash\ngo install github.com/darmiel/d2dc/cmd/d2dc@latest\n```\n\n## Build\n### Prerequisites\n* Go 1.15+\n* Git (or just download the tarball [here](https://github.com/darmiel/d2dc/archive/refs/heads/main.tar.gz))\n\n### Build\nBuild builds the project and outputs the executable file in the root folder\n\n```bash\n$ git clone https://github.com/darmiel/d2dc\n$ cd d2dc\n$ go build ./cmd/d2dc\n\n# (optional): Install to path:\n$ go install ./cmd/d2dc\n```\n\n## Why?\nI wanted to learn a bit of the commands for `docker run` and so I thought this would be a good project to learn those commands.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmiel%2Fd2dc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarmiel%2Fd2dc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmiel%2Fd2dc/lists"}