I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
| version: '2' | |
| services: | |
| redis: | |
| restart: always | |
| image: sameersbn/redis:latest | |
| command: | |
| - --loglevel warning | |
| volumes: | |
| - redis_data:/var/lib/redis |
| #cloud-config | |
| write_files: | |
| - path: /opt/bin/install_docker_compose.sh | |
| permissions: 0700 | |
| owner: root | |
| content: | | |
| #!/bin/bash | |
| set -e | |
| set -u |
| variable "do_token" {} | |
| provider "digitalocean" { | |
| token = "${var.do_token}" | |
| } | |
| resource "digitalocean_droplet" "gitlab-selfhosted" { | |
| image="coreos-stable" | |
| name="gitlab" | |
| region="sfo2" |
| #!/bin/bash | |
| # File: deis-backup.sh | |
| # Author: Ian Blenke | |
| # License: Apache License, Version 2.0 | |
| # | |
| # Note: This script is meant to be run under CoreOS "toolbox", as it uses the /media mount and talks locally to etcd to obtain Deis ceph credentials. | |
| # Error out whenever something returns a non-zero errno | |
| set -eo pipefail |
| # Use 'docker.io' if using the official packages on Ubuntu 14.04+ | |
| alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'" | |
| drm() { docker rm ; } | |
| dri() { docker rmi ; } | |
| alias dkd="docker run -d -P" | |
| alias dki="docker run -t -i -P" | |
| alias docker_rmi_all='docker rmi $(docker images|tail -n +2|awk '\''{print $1":"$2}'\'')' | |
| ##### |
| goroutine 37 [running]: | |
| runtime.panic(0x31afe0, 0xc2080da020) | |
| /usr/local/Cellar/go/1.3.1/libexec/src/pkg/runtime/panic.c:279 +0xf5 | |
| testing.func·008() | |
| /usr/local/Cellar/go/1.3.1/libexec/src/pkg/testing/testing.go:629 +0xe6 | |
| created by time.goFunc | |
| /usr/local/Cellar/go/1.3.1/libexec/src/pkg/time/sleep.go:121 +0x47 | |
| goroutine 16 [chan receive, 20 minutes]: | |
| testing.RunTests(0x4fd988, 0x6572f0, 0x1, 0x1, 0x3aa301) |
| [Unit] | |
| Description=MyApp | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| TimeoutStartSec=0 | |
| ExecStartPre=-/usr/bin/docker kill busybox1 | |
| ExecStartPre=-/usr/bin/docker rm busybox1 | |
| ExecStartPre=/usr/bin/docker pull busybox |
| --- | |
| - hosts: all | |
| remote_user: vagrant | |
| tasks: | |
| - name: install apt signing key | |
| apt_key: url=https://get.docker.io/gpg state=present | |
| - name: add repository | |
| copy: src=docker.list dest=/etc/apt/sources.list.d/docker.list |