diff --git a/README.md b/README.md index 621d1f08..28ef1d74 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,13 @@ Options that can be overridden are: - `PACKAGE_NAME`: base name of the output package. (default: `streamline-emr`) - `OUTPUT_DIR`: directory where packages will be stored. (default: `$PROJECT_ROOT/build-packages`) - `PACKAGE_IMAGES`: if set to a value other than 1, do NOT package images. (default: `1`) +- `IMAGE_TAG`: if set, used to specify a source image tag. (default: uses git-based version name) +- `IMAGES_LIST`: if set, specifies an alternate image list file. (default: `$PROJECT_ROOT/images.csv`) + +For example, to build using the absolute latest images available: +```bash +IMAGE_TAG=latest package.sh +``` ## Installing 1. extract the generated archive file in a temporary folder on the target system @@ -79,4 +86,44 @@ Several scripts are used to manage app instances, including: `entry`: main entry script used to start all configured instances - does not return until a service stops or the process is interrupted. `start`: loads configuration details from `instances.conf`, then configures and starts each application instance in a dedicated subfolder `stop`: locates and stops all instances, even if no longer defined in `instances.conf` -`monitor`: checks the status of each instance service and sends data to `bgsystemlog` if possible (loc: `streamline_emr`) \ No newline at end of file +`monitor`: checks the status of each instance service and sends data to `bgsystemlog` if possible (loc: `streamline_emr`) + +## Docker Images + +We want to use our own copy of the Docker images hosted on our GitLab Registry. The `docker` folder contains a set of Dockerfiles that should be used for generating images. + +### Automated +The script `build-image` can be used to automatically build, tag, and push images with standard naming conventions. To build and push all images, simple run `build-image -p`. To simply build images and skip pushing to a registry, omit the `-p` flag. + +Building for another platform (e.g. building arm64 from amd64 host) may fail if the Dockerfile requires running certain commands. To build only specific images, dockerfiles may be specified with `build-image -f [ -f ... ]` + +Other options can be specified to override the image name or version. See the help menu for full details: `build-image -h` + +### Manual +1. Make sure you are logged in to the Signalytic GitLab Registry: + + ```bash + # Login to the registry + docker login registry.gitlab.com + ``` + +2. Build an image (note: we're using platforms `linux/amd64` and `linux/arm64`) + + ```bash + # Build an image + docker build -f ${DOCKERFILE} --platform ${PLATFORM} -t ${IMAGE_TAG} . + ``` + +3. Make a copy of an existing image: + + ```bash + # Create a tag + docker tag ${IMAGE_ID} registry.gitlab.com/signalytic/client-external/streamline/streamline-emr/${NAME}:${TAG} + ``` + +3. Push the image to our GitLab Registry: + + ```bash + # Push the image + docker push registry.gitlab.com/signalytic/client-external/streamline/streamline-emr/${NAME}:${TAG} + ```