Skip to content

Instantly share code, notes, and snippets.

@chriskyfung
Created February 15, 2026 08:26
Show Gist options
  • Select an option

  • Save chriskyfung/149669c0e5cfa299fc279436a43f2317 to your computer and use it in GitHub Desktop.

Select an option

Save chriskyfung/149669c0e5cfa299fc279436a43f2317 to your computer and use it in GitHub Desktop.
Custom lazydocker configuration with interactive commands for containers, images, and volumes
# yaml-language-server: $schema=https://json.schemastore.org/lazydocker.json
gui:
language: 'en'
customCommands:
containers:
- name: bash
attach: true
command: docker exec -it {{ .Container.ID }} /bin/sh
serviceNames: []
images:
- name: run
attach: true
command: docker run --rm -it {{ .Image.Name }}:{{.Image.Tag}}
serviceNames: []
- name: run with sh
attach: true
command: docker run --rm -it --entrypoint sh {{ .Image.Name }}:{{.Image.Tag}}
serviceNames: []
volumes:
- name: shell in volume
attach: true
command: docker run --rm -it -v {{ .Volume.Name }}:/data -w /data alpine /bin/sh
serviceNames: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment