From 30ac340383f80be6d8680fec82cea1a9171b1fad Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 24 Feb 2015 14:23:51 -0800 Subject: [PATCH 1/5] Initial onbuild/slim description generation --- .template-helpers/template.md | 2 +- .template-helpers/variant-onbuild.md | 3 +++ .template-helpers/variant-slim.md | 3 +++ .template-helpers/variant.md | 7 +++++++ .template-helpers/variant.sh | 31 ++++++++++++++++++++++++++++ python/README.md | 16 ++++++++++++++ update.sh | 3 +++ 7 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .template-helpers/variant-onbuild.md create mode 100644 .template-helpers/variant-slim.md create mode 100644 .template-helpers/variant.md create mode 100755 .template-helpers/variant.sh diff --git a/.template-helpers/template.md b/.template-helpers/template.md index 28090fdfc..411865033 100644 --- a/.template-helpers/template.md +++ b/.template-helpers/template.md @@ -4,7 +4,7 @@ For more information about this image and its history, please see the [relevant manifest file (`library/%%REPO%%`)](https://github.com/docker-library/official-images/blob/master/library/%%REPO%%) in the [`docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images). -%%CONTENT%%%%LICENSE%% +%%CONTENT%%%%VARIANT%%%%LICENSE%% # Supported Docker versions diff --git a/.template-helpers/variant-onbuild.md b/.template-helpers/variant-onbuild.md new file mode 100644 index 000000000..b51a9ecd6 --- /dev/null +++ b/.template-helpers/variant-onbuild.md @@ -0,0 +1,3 @@ +## `%%REPO%%:onbuild` + +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM %%REPO%%:onbuild` will be enough to create a stand-alone image for your project. diff --git a/.template-helpers/variant-slim.md b/.template-helpers/variant-slim.md new file mode 100644 index 000000000..d5744ac0f --- /dev/null +++ b/.template-helpers/variant-slim.md @@ -0,0 +1,3 @@ +## `%%REPO%%:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `%%REPO%%`. Unless you are working in an environment where *only* the %%REPO%% image will be deployed and you have space constraints, we highly recommend using the default image of this repository. diff --git a/.template-helpers/variant.md b/.template-helpers/variant.md new file mode 100644 index 000000000..554a78c42 --- /dev/null +++ b/.template-helpers/variant.md @@ -0,0 +1,7 @@ +# Image Variants + +The `%%REPO%%` images come in many flavors, each designed for a specific use case. + +## `%%REPO%%:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh new file mode 100755 index 000000000..86c5a6007 --- /dev/null +++ b/.template-helpers/variant.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -e + +repo="$1" +if [ -z "$repo" ]; then + echo >&2 "usage: $0 repo" + echo >&2 " ie: $0 hylang" + exit 1 +fi + +dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" + +IFS=$'\n' +tags=( $(curl -sSL 'https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) +unset IFS + +text= +for tag in "${tags[@]}"; do + if [ -f "$dir/variant-${tag}.md" ]; then + text+=$'\n' # give a little space + # because parameter expansion eats the trailing newline + text+="$(<"$dir/variant-${tag}.md")"$'\n' + fi +done +if [ "$text" ]; then + # give a little space + echo + echo + cat "$dir/variant.md" + echo "$text" +fi diff --git a/python/README.md b/python/README.md index 8c46a932c..9067e3662 100644 --- a/python/README.md +++ b/python/README.md @@ -52,6 +52,22 @@ or (again, if you need to use Python 2): docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:2 python your-daemon-or-script.py +# Image Variants + +The `python` images come in many flavors, each designed for a specific use case. + +## `python:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `python:onbuild` + +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM python:onbuild` will be enough to create a stand-alone image for your project. + +## `python:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `python`. Unless you are working in an environment where *only* the python image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + # License View license information for [Python 2](https://docs.python.org/2/license.html) and [Python 3](https://docs.python.org/3/license.html). diff --git a/update.sh b/update.sh index d6bc294c0..05f21814d 100755 --- a/update.sh +++ b/update.sh @@ -101,6 +101,9 @@ for repo in "${repos[@]}"; do echo ' CONTENT => '"$repo"'/content.md' replace_field "$repo" 'CONTENT' "$(cat "$repo/content.md")" + echo ' VARIANT => variant.sh' + replace_field "$repo" 'VARIANT' "$("$helperDir/variant.sh" "$repo")" + # has to be after CONTENT because it's contained in content.md echo " LOGO => $logo" replace_field "$repo" 'LOGO' "$logo" '\s*' From adfd93e313332f3ec0df7980450ecb0f9469808e Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 24 Feb 2015 15:23:17 -0800 Subject: [PATCH 2/5] Run update on all the things to generate onbuild docs --- django/README.md | 12 ++++++++++++ golang/README.md | 12 ++++++++++++ iojs/README.md | 16 ++++++++++++++++ maven/README.md | 12 ++++++++++++ mono/README.md | 12 ++++++++++++ node/README.md | 16 ++++++++++++++++ pypy/README.md | 16 ++++++++++++++++ rails/README.md | 12 ++++++++++++ ruby/README.md | 16 ++++++++++++++++ 9 files changed, 124 insertions(+) diff --git a/django/README.md b/django/README.md index ab5107671..ca70dfc5a 100644 --- a/django/README.md +++ b/django/README.md @@ -48,6 +48,18 @@ If you want to generate the scaffolding for a new Django project, you can do the This will create a sub-directory named `mysite` inside your current directory. +# Image Variants + +The `django` images come in many flavors, each designed for a specific use case. + +## `django:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `django:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM django:onbuild` will be enough to create a stand-alone image for your project. + # License View [license information](https://github.com/django/django/blob/master/LICENSE) for the software contained in this image. diff --git a/golang/README.md b/golang/README.md index d77fc8946..809ed2921 100644 --- a/golang/README.md +++ b/golang/README.md @@ -62,6 +62,18 @@ Alternatively, you can build for multiple platforms at once: > done > done +# Image Variants + +The `golang` images come in many flavors, each designed for a specific use case. + +## `golang:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `golang:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM golang:onbuild` will be enough to create a stand-alone image for your project. + # License View [license information](http://golang.org/LICENSE) for the software contained in this image. diff --git a/iojs/README.md b/iojs/README.md index 8fff0163f..d9d5d2756 100644 --- a/iojs/README.md +++ b/iojs/README.md @@ -37,6 +37,22 @@ To run a single script, you can mount it in a volume under `/usr/src/app`. From $ docker run -v ${PWD}:/usr/src/app -w /usr/src/app --it --rm iojs iojs index.js +# Image Variants + +The `iojs` images come in many flavors, each designed for a specific use case. + +## `iojs:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `iojs:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM iojs:onbuild` will be enough to create a stand-alone image for your project. + +## `iojs:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `iojs`. Unless you are working in an environment where *only* the iojs image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + # License View [license information](https://github.com/iojs/io.js/blob/master/LICENSE) for the software contained in this image. diff --git a/maven/README.md b/maven/README.md index 2bf4a3a96..fd3442516 100644 --- a/maven/README.md +++ b/maven/README.md @@ -37,6 +37,18 @@ For many simple projects, you may find it inconvenient to write a complete `Dock docker run -it --rm --name my-maven-project -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-7 mvn clean install +# Image Variants + +The `maven` images come in many flavors, each designed for a specific use case. + +## `maven:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `maven:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM maven:onbuild` will be enough to create a stand-alone image for your project. + # License View [license information](https://www.apache.org/licenses/) for the software contained in this image. diff --git a/mono/README.md b/mono/README.md index 7f5349ad0..54e17e560 100644 --- a/mono/README.md +++ b/mono/README.md @@ -46,6 +46,18 @@ This Docker image is provided by Xamarin, for users of the Mono Project. Thanks to [Michael Friis](http://friism.com/) for his preliminary work. +# Image Variants + +The `mono` images come in many flavors, each designed for a specific use case. + +## `mono:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `mono:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM mono:onbuild` will be enough to create a stand-alone image for your project. + # License This Docker Image is licensed with the Expat License. See the [Mono Project licensing FAQ](http://www.mono-project.com/docs/faq/licensing/) for details on how Mono and associated libraries are licensed. diff --git a/node/README.md b/node/README.md index 204ddc187..aa5bcd3c0 100644 --- a/node/README.md +++ b/node/README.md @@ -50,6 +50,22 @@ For many simple, single file projects, you may find it inconvenient to write a c docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp node:0.10 node your-daemon-or-script.js +# Image Variants + +The `node` images come in many flavors, each designed for a specific use case. + +## `node:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `node:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM node:onbuild` will be enough to create a stand-alone image for your project. + +## `node:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `node`. Unless you are working in an environment where *only* the node image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + # License View [license information](https://github.com/joyent/node/blob/master/LICENSE) for the software contained in this image. diff --git a/pypy/README.md b/pypy/README.md index c960bf648..639e21b97 100644 --- a/pypy/README.md +++ b/pypy/README.md @@ -48,6 +48,22 @@ or (again, if you need to use Python 2): docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp pypy:2 pypy your-daemon-or-script.py +# Image Variants + +The `pypy` images come in many flavors, each designed for a specific use case. + +## `pypy:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `pypy:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM pypy:onbuild` will be enough to create a stand-alone image for your project. + +## `pypy:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `pypy`. Unless you are working in an environment where *only* the pypy image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + # License View [license information](https://bitbucket.org/pypy/pypy/src/c3ff0dd6252b6ba0d230f3624dbb4aab8973a1d0/LICENSE?at=default) for software contained in this image. diff --git a/rails/README.md b/rails/README.md index 0c53e12bd..3055e9260 100644 --- a/rails/README.md +++ b/rails/README.md @@ -49,6 +49,18 @@ If you want to generate the scaffolding for a new Rails project, you can do the This will create a sub-directory named `webapp` inside your current directory. +# Image Variants + +The `rails` images come in many flavors, each designed for a specific use case. + +## `rails:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `rails:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM rails:onbuild` will be enough to create a stand-alone image for your project. + # License View [license information](https://github.com/rails/rails#license) for the software contained in this image. diff --git a/ruby/README.md b/ruby/README.md index b138bc928..19eb1619b 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -56,6 +56,22 @@ For many simple, single file projects, you may find it inconvenient to write a c docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp ruby:2.1 ruby your-daemon-or-script.rb +# Image Variants + +The `ruby` images come in many flavors, each designed for a specific use case. + +## `ruby:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. + +## `ruby:onbuild` + +This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM ruby:onbuild` will be enough to create a stand-alone image for your project. + +## `ruby:slim` + +This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `ruby`. Unless you are working in an environment where *only* the ruby image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + # License View [license information](https://www.ruby-lang.org/en/about/license.txt) for the software contained in this image. From 78d6ca135994ebe31bd8c4d3effb3e0896c2deed Mon Sep 17 00:00:00 2001 From: William Blankenship Date: Mon, 16 Mar 2015 19:08:12 -0500 Subject: [PATCH 3/5] Detect if base image uses buildpack-deps --- .template-helpers/variant.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh index 86c5a6007..a60914e0e 100755 --- a/.template-helpers/variant.sh +++ b/.template-helpers/variant.sh @@ -9,9 +9,10 @@ if [ -z "$repo" ]; then fi dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" +url='https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" IFS=$'\n' -tags=( $(curl -sSL 'https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) +tags=( $(curl -sSL $url | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) unset IFS text= @@ -23,9 +24,14 @@ for tag in "${tags[@]}"; do fi done if [ "$text" ]; then - # give a little space - echo - echo - cat "$dir/variant.md" - echo "$text" + latest=($(curl -sSL $url | sed -e 's/git:\/\/github.com\///' -e 's/@/ /' - | grep "latest")) + dockerfile='https://raw.githubusercontent.com/'"${latest[1]}"'/'"${latest[2]}"'/'"${latest[3]}"'/Dockerfile' + base_image=$(curl -sSL $dockerfile | sed 's/:/\t/' | nawk '/^FROM .*$/ { print $2 }') + if [ "$base_image" = "buildpack-deps" ]; then + # give a little space + echo + echo + cat "$dir/variant.md" + echo "$text" + fi fi From a8517af5eaa7a4a672077738982222156a5179af Mon Sep 17 00:00:00 2001 From: William Blankenship Date: Tue, 17 Mar 2015 09:27:30 -0500 Subject: [PATCH 4/5] default `image-[version]` wording, and ran `update.sh` --- .template-helpers/variant-buildpacks.md | 7 +++++++ .template-helpers/variant.md | 2 +- .template-helpers/variant.sh | 10 ++++++---- django/README.md | 4 ++-- golang/README.md | 2 +- iojs/README.md | 2 +- maven/README.md | 4 ++-- mono/README.md | 4 ++-- node/README.md | 2 +- pypy/README.md | 2 +- rails/README.md | 4 ++-- ruby/README.md | 2 +- 12 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 .template-helpers/variant-buildpacks.md diff --git a/.template-helpers/variant-buildpacks.md b/.template-helpers/variant-buildpacks.md new file mode 100644 index 000000000..554a78c42 --- /dev/null +++ b/.template-helpers/variant-buildpacks.md @@ -0,0 +1,7 @@ +# Image Variants + +The `%%REPO%%` images come in many flavors, each designed for a specific use case. + +## `%%REPO%%:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. diff --git a/.template-helpers/variant.md b/.template-helpers/variant.md index 554a78c42..efcccf49c 100644 --- a/.template-helpers/variant.md +++ b/.template-helpers/variant.md @@ -4,4 +4,4 @@ The `%%REPO%%` images come in many flavors, each designed for a specific use cas ## `%%REPO%%:` -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh index a60914e0e..fce772d5b 100755 --- a/.template-helpers/variant.sh +++ b/.template-helpers/variant.sh @@ -27,11 +27,13 @@ if [ "$text" ]; then latest=($(curl -sSL $url | sed -e 's/git:\/\/github.com\///' -e 's/@/ /' - | grep "latest")) dockerfile='https://raw.githubusercontent.com/'"${latest[1]}"'/'"${latest[2]}"'/'"${latest[3]}"'/Dockerfile' base_image=$(curl -sSL $dockerfile | sed 's/:/\t/' | nawk '/^FROM .*$/ { print $2 }') + # give a little space + echo + echo if [ "$base_image" = "buildpack-deps" ]; then - # give a little space - echo - echo + cat "$dir/variant-buildpacks.md" + else cat "$dir/variant.md" - echo "$text" fi + echo "$text" fi diff --git a/django/README.md b/django/README.md index ca70dfc5a..4e32a3c46 100644 --- a/django/README.md +++ b/django/README.md @@ -54,11 +54,11 @@ The `django` images come in many flavors, each designed for a specific use case. ## `django:` -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. ## `django:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM django:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM django:onbuild` will be enough to create a stand-alone image for your project. # License diff --git a/golang/README.md b/golang/README.md index 809ed2921..9bf4c2e99 100644 --- a/golang/README.md +++ b/golang/README.md @@ -72,7 +72,7 @@ This is the defacto image. If you are unsure about what your needs are, you prob ## `golang:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM golang:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM golang:onbuild` will be enough to create a stand-alone image for your project. # License diff --git a/iojs/README.md b/iojs/README.md index d9d5d2756..12f4716f4 100644 --- a/iojs/README.md +++ b/iojs/README.md @@ -47,7 +47,7 @@ This is the defacto image. If you are unsure about what your needs are, you prob ## `iojs:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM iojs:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM iojs:onbuild` will be enough to create a stand-alone image for your project. ## `iojs:slim` diff --git a/maven/README.md b/maven/README.md index fd3442516..bbe9da49e 100644 --- a/maven/README.md +++ b/maven/README.md @@ -43,11 +43,11 @@ The `maven` images come in many flavors, each designed for a specific use case. ## `maven:` -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. ## `maven:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM maven:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM maven:onbuild` will be enough to create a stand-alone image for your project. # License diff --git a/mono/README.md b/mono/README.md index 54e17e560..fcb9608a2 100644 --- a/mono/README.md +++ b/mono/README.md @@ -52,11 +52,11 @@ The `mono` images come in many flavors, each designed for a specific use case. ## `mono:` -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. ## `mono:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM mono:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM mono:onbuild` will be enough to create a stand-alone image for your project. # License diff --git a/node/README.md b/node/README.md index aa5bcd3c0..8d5a058d8 100644 --- a/node/README.md +++ b/node/README.md @@ -60,7 +60,7 @@ This is the defacto image. If you are unsure about what your needs are, you prob ## `node:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM node:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM node:onbuild` will be enough to create a stand-alone image for your project. ## `node:slim` diff --git a/pypy/README.md b/pypy/README.md index 639e21b97..f9f03ad6a 100644 --- a/pypy/README.md +++ b/pypy/README.md @@ -58,7 +58,7 @@ This is the defacto image. If you are unsure about what your needs are, you prob ## `pypy:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM pypy:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM pypy:onbuild` will be enough to create a stand-alone image for your project. ## `pypy:slim` diff --git a/rails/README.md b/rails/README.md index 3055e9260..1f27eea5f 100644 --- a/rails/README.md +++ b/rails/README.md @@ -55,11 +55,11 @@ The `rails` images come in many flavors, each designed for a specific use case. ## `rails:` -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of [`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/). `buildpack-deps` is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system. +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. ## `rails:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM rails:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM rails:onbuild` will be enough to create a stand-alone image for your project. # License diff --git a/ruby/README.md b/ruby/README.md index 19eb1619b..20186ace2 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -66,7 +66,7 @@ This is the defacto image. If you are unsure about what your needs are, you prob ## `ruby:onbuild` -This image makes building derivitative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM ruby:onbuild` will be enough to create a stand-alone image for your project. +This image makes building derivative images easier. For most use cases, creating a `Dockerfile` in the base of your project directory with the line `FROM ruby:onbuild` will be enough to create a stand-alone image for your project. ## `ruby:slim` From d50d3153084d3723ca23f5188651ca2701afdcb6 Mon Sep 17 00:00:00 2001 From: William Blankenship Date: Tue, 17 Mar 2015 17:53:55 -0500 Subject: [PATCH 5/5] Style changes and only process dockerfiles from github.com --- .template-helpers/variant.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh index fce772d5b..1f6c7af27 100755 --- a/.template-helpers/variant.sh +++ b/.template-helpers/variant.sh @@ -9,10 +9,10 @@ if [ -z "$repo" ]; then fi dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" -url='https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" +url='https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" IFS=$'\n' -tags=( $(curl -sSL $url | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) +tags=( $(curl -sSL "$url" | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) unset IFS text= @@ -24,16 +24,19 @@ for tag in "${tags[@]}"; do fi done if [ "$text" ]; then - latest=($(curl -sSL $url | sed -e 's/git:\/\/github.com\///' -e 's/@/ /' - | grep "latest")) - dockerfile='https://raw.githubusercontent.com/'"${latest[1]}"'/'"${latest[2]}"'/'"${latest[3]}"'/Dockerfile' - base_image=$(curl -sSL $dockerfile | sed 's/:/\t/' | nawk '/^FROM .*$/ { print $2 }') - # give a little space - echo - echo - if [ "$base_image" = "buildpack-deps" ]; then - cat "$dir/variant-buildpacks.md" - else - cat "$dir/variant.md" - fi - echo "$text" + latest=($(curl -sSL "$url" | grep "latest.*github.com" | sed -e 's!git://github.com/!!' -e 's/@/ /' -)) + if [ -z "latest" ]; then + exit 0 # If not github or no latest tag, we are done here + fi + dockerfile='https://raw.githubusercontent.com/'"${latest[1]}"'/'"${latest[2]}"'/'"${latest[3]}"'/Dockerfile' + baseImage=$(curl -sSL $dockerfile | sed 's/:/\t/' | awk '$1 == "FROM" { print $2 }') + # give a little space + echo + echo + if [ "$baseImage" = "buildpack-deps" ]; then + cat "$dir/variant-buildpacks.md" + else + cat "$dir/variant.md" + fi + echo "$text" fi