install debian packages

RUN apt-get update && \
    apt-get install --no-install-recommends -y curl && \
    rm -rf /var/lib/apt/lists/*

download URL with curl

RUN mkdir -p /dl && \
    cd /dl && \
    curl -SsfLO http://nginx.org/download/nginx-1.8.0.tar.gz

this could maybe be done via just ADD

touch Gemfile Gemfile.lock

touch -m -t 200601021504.05 Gemfile Gemfile.lock bundle_config

detach container

C-p C-q

cleanup

exited containers

for id in $(docker ps -f status=exited -q); do docker rm $id; done

images by pattern

PATTERN="^nginx-"
for id in $(docker images | grep ${PATTERN} | awk '{ print $3 }'); do docker rmi $id; done

new system commands

docker system df
docker system prune

docker-compose

name="docker-compose-`uname -s`-`uname -m`"
curl -SsfL https://github.com/docker/compose/releases/download/1.9.0/${name}

docker api

curl -ks https://gcr.io/v2/google_containers/hyperkube/tags/list | jq '.'
curl -ks https://quay.io/v1/repositories/coreos/hyperkube/tags | jq '.'
curl -ks https://registry.hub.docker.com/v1/repositories/jenkinsci/jenkins/tags | jq '.'