Some README fixups

* Fix the microbadges

* Wrap commands to 100 lines so github doesn't show a horizontal scroll
  bar

* Break out the example for building from a different base so its more
  clear

* Fix a typo and add some backticks around inline code blocks

Change-Id: Ib5144cc34e5c9968c333caf9a1083c78f86ae652
This commit is contained in:
Paul Bourke 2018-03-08 17:49:36 +00:00
parent 483a24fefa
commit 9c55e26225
1 changed files with 16 additions and 13 deletions

View File

@ -23,19 +23,25 @@ by LOCI. For simplicity, we will continue to use Keystone as an example.
### Keystone Image Layer Info
[![](https://images.microbadger.com/badges/version/loci/keystone:debian.svg)](https://microbadger.com/images/loci/keystone:debian "loci/keystone:debian") [![](https://images.microbadger.com/badges/image/loci/keystone:debian.svg)](https://microbadger.com/images/loci/keystone:debian "loci/keystone:debian")
[![](https://images.microbadger.com/badges/version/loci/keystone:master-debian.svg)](https://microbadger.com/images/loci/keystone:master-debian "loci/keystone:master-debian") [![](https://images.microbadger.com/badges/image/loci/keystone:master-debian.svg)](https://microbadger.com/images/loci/keystone:master-debian "loci/keystone:master-debian")
[![](https://images.microbadger.com/badges/version/loci/keystone:ubuntu.svg)](https://microbadger.com/images/loci/keystone:ubuntu "loci/keystone:ubuntu") [![](https://images.microbadger.com/badges/image/loci/keystone:ubuntu.svg)](https://microbadger.com/images/loci/keystone:ubuntu "loci/keystone:ubuntu")
[![](https://images.microbadger.com/badges/version/loci/keystone:master-ubuntu.svg)](https://microbadger.com/images/loci/keystone:master-ubuntu "loci/keystone:master-ubuntu") [![](https://images.microbadger.com/badges/image/loci/keystone:master-ubuntu.svg)](https://microbadger.com/images/loci/keystone:master-ubuntu "loci/keystone:master-ubuntu")
[![](https://images.microbadger.com/badges/version/loci/keystone:centos.svg)](https://microbadger.com/images/loci/keystone:centos "loci/keystone:centos") [![](https://images.microbadger.com/badges/image/loci/keystone:centos.svg)](https://microbadger.com/images/loci/keystone:centos "loci/keystone:centos")
[![](https://images.microbadger.com/badges/version/loci/keystone:master-centos.svg)](https://microbadger.com/images/loci/keystone:master-centos "loci/keystone:master-centos") [![](https://images.microbadger.com/badges/image/loci/keystone:master-centos.svg)](https://microbadger.com/images/loci/keystone:master-centos "loci/keystone:master-centos")
### Building locally
It's really easy to build images locally for the distro of your choice. To
build an image you only need to run one of the following commands:
It's really easy to build images locally:
``` bash
$ docker build https://git.openstack.org/openstack/loci.git --build-arg PROJECT=keystone --tag keystone:ubuntu
$ docker build https://git.openstack.org/openstack/loci.git --build-arg PROJECT=keystone --tag keystone:centos --build-arg FROM=centos:7
$ docker build https://git.openstack.org/openstack/loci.git --build-arg PROJECT=keystone \
--tag keystone:ubuntu
```
The default base distro is Ubuntu, however, you can use the following form to build from a distro of
your choice, in this case, CentOS:
``` bash
$ docker build https://git.openstack.org/openstack/loci.git --build-arg PROJECT=keystone \
--tag keystone:centos --build-arg FROM=centos:7
```
If building behind a proxy, remember to use build arguments to pass these
@ -49,9 +55,6 @@ $ docker build https://git.openstack.org/openstack/loci.git \
--tag keystone:ubuntu
```
You can, of course, substitute `ubuntu` with your distro of choice using the
FROM build arg.
For more advanced building you can use docker build arguments to define:
* `FROM` The base Docker image to build from. Currently supported are
ubuntu:xenial and centos:7
@ -64,13 +67,13 @@ For more advanced building you can use docker build arguments to define:
* `GID` The gid of the group that will be created (default to 42424).
* `WHEELS` The location of the wheels tarball. This accepts a url to a
tarball or a Docker image name in the form of
[myregistry/]mydockernamespace/requirements[:ubuntu]
`[myregistry/]mydockernamespace/requirements[:ubuntu]`
* `DISTRO` This is a helper variable used for scripts. It would primarily be
used in situations where the script would not detect the correct distro.
For example, you would set DISTRO=centos when running from an oraclelinux
For example, you would set `DISTRO=centos` when running from an oraclelinux
base image.
* `PROFILES` The bindep profiles to specify to configure which packages get
installed. This is a space sperated list.
installed. This is a space separated list.
* `PIP_PACKAGES` Specify additional python packages you would like installed.
The only caveat is these packages must exist in WHEELS form. So if
you wanted to include rpdb, you would need to have built that into your