Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sotojn committed Jul 24, 2024
1 parent 9213406 commit 02026fa
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,30 @@ Without: (this will save the image size by roughly 200MB)

**_DEPRECATED:_** Core images are no longer built and pushed to docker.hub.

- `terascope/node-base:22.2.0-core`
- `terascope/node-base:20.11.1-core`
- `terascope/node-base:18.19.1-core`
- `terascope/node-base:22-core`
- `terascope/node-base:20-core`
- `terascope/node-base:18-core`
- `terascope/node-base:22.*.*-core`
- `terascope/node-base:20.*.*-core`
- `terascope/node-base:18.*.*-core`

Check for the latest version tags here:

https://hub.docker.com/r/terascope/node-base/tags
https://github.com/terascope/base-docker-image/pkgs/container/node-base

At the moment, manual builds can be done like this (substitute the appropriate
NodeJS version):

```bash
# With connectors
docker build --file Dockerfile --pull \
--build-arg NODE_VERSION=18.19.1 \
--tag terascope/node-base:18.19.1 .
--build-arg NODE_VERSION=18 \
--tag ghcr.io/terascope/node-base:18 .

# Without connectors
docker build --file Dockerfile.core --pull \
--build-arg NODE_VERSION=18.19.1 \
--tag terascope/node-base:18.19.1-core .
--build-arg NODE_VERSION=18 \
--tag ghcr.io/terascope/node-base:18-core .
```

Double check the action output before relying on the above commands.
Expand All @@ -44,6 +47,18 @@ Double check the action output before relying on the above commands.

- Docker image builds will happen on any push to any branch other than `master`.
- When a Github release is made, the image will be built and then pushed to
docker hub.
the github container registry.

**NOTE:** _When making changes to the github workflows, the node matrix array only supports either a major node version or a full specific node version. Ex: [18, 22.4.1]. Adding a major-minor version like "18.19" is not supported as of right now._

### How tags and node versions are released in the workflow

The workflow for the base image tags is closely linked to the Node.js version used in the image. Here's a simple breakdown of how it works:

**Major Version Tag:** The image will either grab the latest available version of a specific major Node.js release from the node alpine image(e.g., Node 18) or it will be pinned to the latest node version that is compatible with the base image. This image is tagged with the major version number (e.g., 18). So in some cases this version will be pinned and not completely up to date with a node release. This tag is always overwritten on release.

**Major-Minor Version Tag:** Next, it will retag and include both the major and minor version numbers (e.g., 18.14). This tag is updated to reflect the latest minor release within the specified major version. This tag will get overwritten in the case of a node-base change or if a new patch is relased for this minor version of node.

**Major-Minor-Patch Version Tag:** Finally, the image will be re-tagged again with the complete version number, including the major, minor, and patch versions (e.g., 18.14.2). This tag points to a specific version of the Node.js release. This image only gets overwritten on a change to the node-base image that isn't node version related.

The build and publishing is done by Github Actions.

0 comments on commit 02026fa

Please sign in to comment.