Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L liquidprompt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Johann Dreo
  • liquidprompt
  • Merge requests
  • !653

Container status display

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Johann Dreo requested to merge github/fork/alanhoyle/master into master Jan 30, 2021
  • Overview 62
  • Commits 3
  • Pipelines 0
  • Changes 7

Created by: alanhoyle

This should detect container status for shells running in Singularity, Docker, LXC and Podman containers.

  • Singularity is detected by the existence of shell variables that singularity creates inside containers. Note: it appears that Singularity clears the PROMPT_COMMAND by default, so updates to the shell prompt are broken.

  • Podman is detected by the existence of a file as documented at https://github.com/containers/libpod/blob/master/docs/podman-run.1.md

  • Docker and LXC are detected by checking for the existence of a file in the /proc virtual hierarchy, and grepping that file for their names.


Note that it also fixes a couple of minor, unrelated things that could be pulled out into a separate pull:

E.g. corrected spelling of "truncated" in liquidprompt and putting the POWERLINE_DIRSTACK_COLOR line in the correct alphabetical spot inthemes/powerline/powerline.theme

Also, the changes in title/subtitle notations in docs/config.rst were done by the Emacs ReST mode, which I believe would know the format far better than me.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alanhoyle/master