{"id":22503143,"url":"https://github.com/afa-farkhod/docker-help","last_synced_at":"2026-04-27T12:02:48.728Z","repository":{"id":239604375,"uuid":"800008632","full_name":"afa-farkhod/Docker-Help","owner":"afa-farkhod","description":"Docker management and useful commands","archived":false,"fork":false,"pushed_at":"2026-02-06T01:42:00.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-30T05:41:07.024Z","etag":null,"topics":["docker","docker-compose","dockerfile"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afa-farkhod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-13T14:24:19.000Z","updated_at":"2026-02-06T01:42:04.000Z","dependencies_parsed_at":"2024-05-13T15:48:47.788Z","dependency_job_id":"8b8b29cc-b6f9-4fec-8902-58d469474c5d","html_url":"https://github.com/afa-farkhod/Docker-Help","commit_stats":null,"previous_names":["afa-farkhod/docker-help"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/afa-farkhod/Docker-Help","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa-farkhod%2FDocker-Help","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa-farkhod%2FDocker-Help/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa-farkhod%2FDocker-Help/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa-farkhod%2FDocker-Help/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afa-farkhod","download_url":"https://codeload.github.com/afa-farkhod/Docker-Help/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa-farkhod%2FDocker-Help/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","dockerfile"],"created_at":"2024-12-06T23:29:27.944Z","updated_at":"2026-04-27T12:02:48.719Z","avatar_url":"https://github.com/afa-farkhod.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Help\nDocker management and useful commands\n\n| Command | Description |\n| --- | --- |\n| `docker build -t custom-exporter:v0.0.1 .` | docker image building from Dockerfile |\n| `docker run -d -p 8000:8000 --name \"custom-exporter\" custom-exporter:v0.0.1.` | docker run the image file in a detached mode |\n| `docker tag custom-exporter:v0.0.1 test/custom-exporter:v0.0.1.` | docker image pushing process to docker hub |\n| `docker push test/custom-exporter:v0.0.1` | docker image pushing process to docker hub |\n| `docker run -d --rm -p 55800:8000(default_port) --name custom-exporter test/custom-exporter:v0.0.1t` | running docker container with neccessary flags |\n| `docker buildx create --name mybuilder --use.` | in case, mac env built docker image doesn't work in Linux env |\n| `docker buildx inspect --bootstrap` | in case, mac env built docker image doesn't work in Linux env |\n| `docker buildx build --platform linux/amd64 -t yourusername/custom-exporter:v0.0.1 --push .` | push to docker hub |\n| `docker logs -f --tail 20 container_id` | check docker container logs with 20 log lines limit |\n| `docker compose logs -f --tail 20` | check docker compose logs with 20 log lines limit |\n| `docker rm $(docker ps -aq)` | remove all unused docker containers |\n| `docker compose down \u0026\u0026 docker compose up -d` | stops the docker compose and runs immediately after stopping it |\n|`docker image prune -a` | remove unused images |\n\n\n## Troubleshooting\n\n- Sometimes quitting the `Docker` in `MacOS` doesn't work successfully! In this case you can follow these:\n  - Check the process running the docker service\n  ```\n  ps aux | grep docker\n  # then you'll see something similar to this\n  USER 14065   0.0  0.2 411036256  33760   ??  S     6:07PM   0:00.05 /Applications/Docker.app/Contents/MacOS/Docker\n  ```\n  - Then firstly try to kill the `PID` as following\n    ```\n    #  kill -9 PID\n    kill -9 14065\n    ```\n  - After running the command, check one more time for the Docker process, if it still exists which means that the Docker application is being restarted automatically by another process\n    ```\n    # then simply run the following command\n    pkill -f Docker\n    ```\n-----------------------------------------------------------------\n-----------------------------------------------------------------\n- To extract the `executable binary` from Docker image follow this:\n  - pull the docker image file:\n```\ndocker pull ghcr.io/unionlabs/uniond-release:v${TAG}\n```\n  - then search for binary uniond in nix store with following command\n```\nsudo find /var/lib/docker/ -name \"uniond\" | grep $(uname -m)\n```\n  - then copy the executable binary to your destination (ready for use)\n------------------------------------------------------------------\n-----------------------------------------------------------------\n- To work inside the docker container run the following command:\n  ```\n  docker run -it --rm --name horcrux-container -v /path/to/your/local/directory:/data ghcr.io/strangelove-ventures/horcrux:union-v0.24 /bin/sh\n  ```\n------------------------------------------------------------------\n-----------------------------------------------------------------\n- While working inside the docker container, to copy contents inside and outside the container, run the following command:\n  ```\n  docker cp /path/to/your/local/directory/test.txt horcrux-container:/data/test.txt\n  ```\n------------------------------------------------------------------\n-----------------------------------------------------------------\n### Docker setup in Linux\n\n- Add Docker’s official GPG key:\n```\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n```\n\n- Install Docker\n```\nsudo apt-get install docker-ce docker-ce-cli containerd.io\n```\n\n- Start and Enable Docker\n  ```\n  sudo systemctl start docker\n  sudo systemctl enable docker\n  ```\n  \n- Sometimes when there are several users in Linux besides the admin, running the docker might cause the following error issue\n```\ndocker ps\n\npermission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json\": dial unix /var/run/docker.sock: connect: permission denied\n```\n  - So first thing we do is, check for the groups and see if it has anything , if not we can simply add the docker group as following:\n    ```\n    # first create docker group\n    sudo groupadd docker\n\n    # then add the particular user to docker group\n    sudo usermod -aG docker ${USER_NAME}\n\n    # after that check for user addition\n    getent group docker\n    docker:x:1007:flow\n    ```\n - Even after above all, it might not work, in this case check for the following file permission mode:\n   ```\n   ls -l /var/run/docker.sock\n   srw-rw---- 1 root root 0 Sep  3 23:46 /var/run/docker.sock\n\n   # it should be root:docker\n   sudo chown root:docker /var/run/docker.sock\n\n   # now we can check groups\n   groups\n   flow adm sudo docker\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafa-farkhod%2Fdocker-help","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafa-farkhod%2Fdocker-help","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafa-farkhod%2Fdocker-help/lists"}