Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Add commands #71

Closed
janette opened this issue Dec 5, 2018 · 0 comments
Closed

Add commands #71

janette opened this issue Dec 5, 2018 · 0 comments
Assignees
Labels

Comments

@janette
Copy link
Member

janette commented Dec 5, 2018

nice to haves

  vnc:
    usage: Prints the project VNC URL
    cmd: |
      VNC_PORT=`ahoy docker compose port browser 5900|cut -d ':' -f2`
      if [ "$AHOY_CMD_PROXY" = "DOCKER" ] && [ "$(ahoy docker proxy-running)" = "1" ]; then
        echo "$(ahoy docker get-hostname):${VNC_PORT}"
      else
        if [ -z "$DOCKER_MACHINE_NAME"  ]; then
          echo "`ahoy docker web-host`:${VNC_PORT}"
        else
          echo "`docker-machine ip default`:${VNC_PORT}"
        fi
      fi
  cleanup:
    usage: Clean ups docker unused images and volumes. See http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/.
    cmd: |
      EXITED=`docker ps -a -q -f status=exited`
      DANGLING=`docker images -f "dangling=true" -q`
      if [ ! -z "$EXITED" ]
      then
        docker rm -v $EXITED
      fi
      if [ ! -z "$DANGLING" ]
      then
        docker rmi $DANGLING
      fi
      docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants