{"id":15581797,"url":"https://github.com/unixorn/docker-helpers.zshplugin","last_synced_at":"2025-03-22T18:33:19.728Z","repository":{"id":22948977,"uuid":"26298484","full_name":"unixorn/docker-helpers.zshplugin","owner":"unixorn","description":"Miscellaneous utility scripts and aliases for use with Docker.","archived":false,"fork":false,"pushed_at":"2023-01-27T16:13:46.000Z","size":74,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-01T17:51:22.664Z","etag":null,"topics":["docker","docker-helpers","hacktoberfest","shell-scripts","zsh","zsh-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unixorn.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-07T01:37:40.000Z","updated_at":"2025-02-28T03:01:57.000Z","dependencies_parsed_at":"2023-02-18T05:45:17.002Z","dependency_job_id":null,"html_url":"https://github.com/unixorn/docker-helpers.zshplugin","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/unixorn%2Fdocker-helpers.zshplugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fdocker-helpers.zshplugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fdocker-helpers.zshplugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fdocker-helpers.zshplugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unixorn","download_url":"https://codeload.github.com/unixorn/docker-helpers.zshplugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236093,"owners_count":20420752,"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-helpers","hacktoberfest","shell-scripts","zsh","zsh-plugin"],"created_at":"2024-10-02T19:55:02.786Z","updated_at":"2025-03-22T18:33:19.405Z","avatar_url":"https://github.com/unixorn.png","language":"Shell","readme":"# Docker helper scripts\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n![Awesomebot](https://github.com/unixorn/docker-helpers.zshplugin/actions/workflows/awesomebot.yml/badge.svg)\n![mega-linter](https://github.com/unixorn/docker-helpers.zshplugin/actions/workflows/mega-linter.yml/badge.svg)\n[![GitHub stars](https://img.shields.io/github/stars/unixorn/docker-helpers.zshplugin.svg)](https://github.com/unixorn/docker-helpers.zshplugin/stargazers)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n## Table of Contents\n\n- [Script list](#script-list)\n- [Installing](#installing)\n  - [Pre-Requisites](#pre-requisites)\n  - [zgenom](#zgenom)\n  - [Antigen](#antigen)\n  - [Oh-My-Zsh](#oh-my-zsh)\n- [Other useful Docker stuff](#other-useful-docker-stuff)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\nThis is a collection of docker helper scripts, packaged as a ZSH plugin to make it easier to use with frameworks like [zgenom](https://github.com/jandamm/zgenom) and [antigen](https://github.com/zsh-users/antigen).\n\nMost of these were collected from blog posts, gists, slack - basically stuff I saw and thought was useful enough to stash away, and I've given credit where I know the source.\n\nIf you wrote something I've collected and I didn't credit you, please create an issue or PR so I can correct it.\n\n## Script list\n\nCommand | Description | Credit\n------- | ----------- | ------\n| `boot2docker-timesync` | boot2docker drifts out of time sync every time my MacBook Pro sleeps. Run this to resync. |\n| `dive` | Wrapper script that calls wagoodman/dive to analyze a container image. |\n| `docker-check-for-image-update` | Check if a given image has been updated, and if so, run a command. | Matthias Lohr's [blog](https://mlohr.com/check-for-docker-image-updates/) |\n| `docker-container-volumes` | List the volumes attached to a container. | [http://www.tech-d.net/2014/05/05/docker-quicktip-5-backing-up-volumes/](http://www.tech-d.net/2014/05/05/docker-quicktip-5-backing-up-volumes/))\n| `docker-create-backup-container` | Creates a container with all the volumes from all the containers on the host. | From [http://www.tech-d.net/2014/05/05/docker-quicktip-5-backing-up-volumes/](http://www.tech-d.net/2014/05/05/docker-quicktip-5-backing-up-volumes/)\n| `docker-delete-stopped-containers` | Cleans up stale stopped containers. |\n| `docker-here` | Builds an ephemeral container, runs it with the parameters you pass `docker-here`, then deletes the ephemeral container. |\n| `docker-ip` | Gets the pid of a running container. |\n| `docker-last` | Print the id of the last container you ran. |\n| `docker-lint` | Lint a Dockerfile with [hadolint](https://github.com/hadolint/hadolint). |\n| `docker-pid` | Print pid of a running container. |\n| `docker-ps-cleanup` | Cleans up `docker ps` output by deleting all exited containers. |\n| `docker-purge-unnamed-images` | Cleans up image cruft by deleting all the images that aren't named. |\n| `docker-remove-dangling-images` | Cleans up image cruft by deleting all dangling images. |\n| `docker-runc` | Uses [fzf](https://github.com/junegunn/fzf) to select an image and run a command in it. |\n| `docker-runinc` | Uses [fzf](https://github.com/junegunn/fzf) to select a running container and run a command inside it. |\n| `docker-shell` | Runs a shell inside a container with `pwd` mounted as `/pwd`. Defaults to bash inside debian:buster-slim, reads shell \u0026 image name from `STANDARD_DOCKER_COMMAND` and `STANDARD_DOCKER_IMAGE` or `$1` and `$2`. |\n| `docker-showipc` | Show the IP of a running docker container. |\n| `docker-stopc` | Stops and/or removes a docker container. |\n| `docker-superclean` | Clear out any stopped containers or stale images. |\n| `docker-update-all-images` | Update all images on the machine. |\n| `fzf-docker-attach` | Use [fzf](https://github.com/junegunn/fzf) to select a docker container to start and attach to |\n| `fzf-docker-rm` | Use [fzf](https://github.com/junegunn/fzf) to select a docker container to remove |\n| `fzf-docker-stop` | Use [fzf](https://github.com/junegunn/fzf) to select a docker container to stop |\n\n## Installing\n\n### Pre-Requisites\n\nNo matter how you choose to install the plugin, it has the following pre-requisites:\n\n- `jq` - Install with `brew install jq`\n- `fzf` - Install with `brew install fzf`\n\n### zgenom\n\nAdd `zgenom load unixorn/docker-helpers.zshplugin` to your `.zshrc` wherever you're loading your other plugins.\n\n### Antigen\n\nAdd `antigen bundle unixorn/docker-helpers.zshplugin` to your `.zshrc` with your other plugins. You can test drive them without editing your .zshrc by running `antigen bundle unixorn/docker-helpers.zshplugin` in a running zsh session.\n\n### Oh-My-Zsh\n\n1. cd to your `oh-my-zsh` plugins directory (~/.oh-my-zsh/custom/plugins)\n2. `git clone https://github.com/unixorn/docker-helpers.zshplugin docker-helpers`\n3. Add docker-helpers to your plugins in your `.zshrc`\n```zsh\n...\nplugins=( ... docker-helpers ...)\n...\n```\n\n## Other useful Docker stuff\n\n* If you use [Sublime Text 2/3](http://sublimetext.com), check out [sublime-docker](https://github.com/dockerparis/sublime-docker). Lets you build inside Docker containers directly from [Sublime Text](http://sublimetext.com).\n* [dive](https://github.com/wagoodman/dive) - A tool for exploring a docker image, layer contents, and discovering ways to shrink your Docker image size.\n","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixorn%2Fdocker-helpers.zshplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funixorn%2Fdocker-helpers.zshplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixorn%2Fdocker-helpers.zshplugin/lists"}