You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-26Lines changed: 57 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,44 +71,75 @@ If the client stops:
71
71
72
72
The `toolkit` container is just a Docker container, so all [Docker CLI commands](https://docs.docker.com/engine/reference/commandline/cli/) work.
73
73
74
-
## Development
74
+
## Container registry
75
75
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
77
79
78
-
To use/build this image, the following tools are required:
80
+
The floating image tags use the following convention:
79
81
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
85
94
86
-
### Using the image
95
+
### Pinned tags
87
96
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:
90
98
91
-
```bash
92
-
npm run pull
99
+
```text
100
+
{terraform version}-{release tag}-{base OS image}
93
101
```
94
102
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:
96
110
97
-
```bash
98
-
npm run build
111
+
```text
112
+
v1.1-v1.0.0-alpine
99
113
```
100
114
101
-
After that, start the image in an interactive terminal with:
115
+
## Usage
102
116
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
105
121
```
106
122
107
-
### File Layout
123
+
## Development
124
+
125
+
To build the default image using the latest version of terraform on alpine, run the following:
108
126
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:
0 commit comments