Skip to content

Commit cb4d4e9

Browse files
author
Sean Sundberg
authored
Updates readme (#7)
Signed-off-by: Sean Sundberg <seansund@us.ibm.com>
1 parent 03e83fd commit cb4d4e9

1 file changed

Lines changed: 57 additions & 26 deletions

File tree

README.md

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,44 +71,75 @@ If the client stops:
7171
7272
The `toolkit` container is just a Docker container, so all [Docker CLI commands](https://docs.docker.com/engine/reference/commandline/cli/) work.
7373
74-
## Development
74+
## Container registry
7575
76-
### Prerequisites
76+
The build automation pushes the built container image to [quay.io/cloudnativetoolkit/cli-tools-core](https://quay.io/cloudnativetoolkit/cli-tools-core)
77+
78+
### Floating tags
7779
78-
To use/build this image, the following tools are required:
80+
The floating image tags use the following convention:
7981
80-
- `Docker` - kinda obvious, but since we are building, testing and running a Docker image, you need to have
81-
the tool available
82-
- `node/npm` - (optional) used to consolidate the configuration and scripts for working with the image, it
83-
is **highly** recommended that `npm` is used; however, it is possible to run the scripts directly by looking
84-
at `package.json` and providing the appropriate values
82+
- `latest` - the latest **alpine** version of the image (currently terraform v1.2)
83+
- `alpine` - the latest **alpine** version of the image (currently terraform v1.2)
84+
- `fedora` - the latest **fedora** version of the image (currently terraform v1.2)
85+
- `v1.2` - the latest **alpine** version of the image using terraform v1.2
86+
- `v1.1` - the latest **alpine** version of the image using terraform v1.1
87+
- `v1.0` - the latest **alpine** version of the image using terraform v1.0
88+
- `v1.2-alpine` - the latest **alpine** version of the image using terraform v1.2
89+
- `v1.1-alpine` - the latest **alpine** version of the image using terraform v1.1
90+
- `v1.0-alpine` - the latest **alpine** version of the image using terraform v1.0
91+
- `v1.2-fedora` - the latest **fedora** version of the image using terraform v1.2
92+
- `v1.1-fedora` - the latest **fedora** version of the image using terraform v1.1
93+
- `v1.0-fedora` - the latest **fedora** version of the image using terraform v1.0
8594
86-
### Using the image
95+
### Pinned tags
8796
88-
To use the image, a local image of the tool is required. You can get the image either by pulling from Docker Hub or
89-
building locally:
97+
Each release within the repository corresponds to a pinned image tag that will never be moved to another image. The pinned tags use the following naming convention:
9098
91-
```bash
92-
npm run pull
99+
```text
100+
{terraform version}-{release tag}-{base OS image}
93101
```
94102
95-
**OR**
103+
where:
104+
105+
- `{terraform version}` - is the major and minor version of the terraform cli (e.g. v1.1)
106+
- `{release tag}` - is the release tag for this repository (e.g. v1.0.0)
107+
- `{base OS image}` - is the base OS image (`alpine` or `fedora`)
108+
109+
For example:
96110
97-
```bash
98-
npm run build
111+
```text
112+
v1.1-v1.0.0-alpine
99113
```
100114
101-
After that, start the image in an interactive terminal with:
115+
## Usage
102116
103-
```bash
104-
npm start
117+
The image can be used by referring to the image url. The following can be used to run the container image interactively:
118+
119+
```shell
120+
docker run -it quay.io/cloudnativetoolkit/cli-tools-core
105121
```
106122
107-
### File Layout
123+
## Development
124+
125+
To build the default image using the latest version of terraform on alpine, run the following:
108126
109-
- `package.json` - scripts and config for the image build
110-
- `Dockerfile` - the docker image definition
111-
- `config.yaml` - the test config file for the `container-structure-test` tool
112-
- `scripts/` - directory for shell scripts used by `package.json` scripts to build, test, and
113-
push the image
114-
- `src/` - directory containing files that should be included in the built image
127+
```shell
128+
docker build -t cli-tools-core .
129+
```
130+
131+
### Changing terraform versions
132+
133+
The terraform version can be changed by passing the `TERRAFORM_VERSION` as a build arg. For example:
134+
135+
```shell
136+
docker build --build-arg TERRAFORM_VERSION=v1.1 -t cli-tools-core:v1.1 .
137+
```
138+
139+
### Changing base OS versions
140+
141+
The base OS can be changed by using the `Dockerfile-fedora` file. For example:
142+
143+
```shell
144+
docker build -f Dockerfile-fedora -t cli-tools-core:fedora .
145+
```

0 commit comments

Comments
 (0)