Skip to content

Instantly share code, notes, and snippets.

View csnoboa's full-sized avatar

Caique Noboa csnoboa

  • Mercado Livre
  • Curitiba, Brasil
View GitHub Profile
@mminer
mminer / dockerpsjson.py
Last active June 4, 2023 11:36
Shell script thats prints the output of `docker ps` in JSON format.
#!/usr/bin/env python3
"""Parses and encodes the result of `docker ps` in JSON format."""
import json
import sys
from collections import namedtuple
from subprocess import Popen, PIPE