...
Here are some example image names to illustrate the convention:
comanage-registry:4.1.12-shibboleth-sp-supervisor-1
comanage-registry:4.1.12-mod_auth_openidc-1
comanage-registry:4.1.12-basic-auth-1
comanage-registry:develop-53966aef-shibboleth-sp-supervisor-1
comanage-registry:hotfix-4.1.x-05bdf0c5-3
999999999999.dkr.ecr.us-east-1.amazonaws.com/comanage/comanage-registry:4.1.12-shibboleth-sp-supervisor-1
comanageproject/comanage-registry:4.1.12-shibboleth-sp-supervisor-1
quay.io/myorg/comanage-registry:4.1.12-shibboleth-sp-supervisor-1
...
This will build the image with name comanage-registry:4.1.12-shibboleth-sp-supervisor-2022_10_07.
...
Code Block |
---|
./container/build.sh --suffix=1 --image_registry=999999999999.dkr.ecr.us-east-1.amazonaws.com registry shibboleth-sp-supervisor aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 999999999999.dkr.ecr.us-east-1.amazonaws.com docker push 999999999999.dkr.ecr.us-east-1.amazonaws.com/comanage-registry:4.1.12-shibboleth-sp-supervisor-1 |
...
Clone the Registry source code repository and change directories to the checked out repository:
Code Block git clone https://github.com/Internet2/comanage-registry.git cd comanage-registry
If you do not wish to build from the main branch, checkout the branch or commit you wish to build:
Code Block git checkout <branch or commit>
Define the variable COMANAGE_REGISTRY_VERSION:
Code Block export COMANAGE_REGISTRY_VERSION=4.1.12
Define the variable COMANAGE_REGISTRY_BASE_IMAGE_VERSION:
Code Block export COMANAGE_REGISTRY_BASE_IMAGE_VERSION=1
Build the base image:
Code Block docker build \ --tag comanage-registry-base:${COMANAGE_REGISTRY_VERSION}-${COMANAGE_REGISTRY_BASE_IMAGE_VERSION} \ --build-arg COMANAGE_REGISTRY_VERSION=${COMANAGE_REGISTRY_VERSION} \ --file container/registry/base/Dockerfile .
If you are building an image that uses the Shibboleth SP for authentication, you must build a base Shibboleth SP image. If not, you may skip this step:
Code Block export COMANAGE_REGISTRY_SHIBBOLETH_SP_VERSION=3.4.1 export COMANAGE_REGISTRY_SHIBBOLETH_SP_BASE_IMAGE_VERSION=1 docker build \ --tag comanage-registry-shibboleth-sp-base:${COMANAGE_REGISTRY_SHIBBOLETH_SP_VERSION}-${COMANAGE_REGISTRY_SHIBBOLETH_SP_BASE_IMAGE_VERSION} \ --build-arg SHIBBOLETH_SP_VERSION=${COMANAGE_REGISTRY_SHIBBOLETH_SP_VERSION} \ --file container/shibboleth-sp-base/Dockerfile .
- Build the deployable image. The build command depends on which authentication method you are using:
Basic Authentication
Code Block docker build \ --tag TAG \ --build-arg COMANAGE_REGISTRY_VERSION=${COMANAGE_REGISTRY_VERSION} \ --build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=${COMANAGE_REGISTRY_BASE_IMAGE_VERSION} \ --file container/registry/basic-auth/Dockerfile .
Shibboleth SP
Code Block docker build \ --tag TAG \ --build-arg COMANAGE_REGISTRY_VERSION=${COMANAGE_REGISTRY_VERSION} \ --build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=${COMANAGE_REGISTRY_BASE_IMAGE_VERSION} \ --build-arg COMANAGE_REGISTRY_SHIBBOLETH_SP_VERSION=${COMANAGE_REGISTRY_SHIBBOLETH_SP_VERSION} \ --build-arg COMANAGE_REGISTRY_SHIBBOLETH_SP_BASE_IMAGE_VERSION=${COMANAGE_REGISTRY_SHIBBOLETH_SP_BASE_IMAGE_VERSION} \ ---file container/registry/shibboleth-sp-supervisor/Dockerfile .
mod_auth_openidc
Code Block docker build \ --tag TAG \ --build-arg COMANAGE_REGISTRY_VERSION=${COMANAGE_REGISTRY_VERSION} \ --build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=${COMANAGE_REGISTRY_BASE_IMAGE_VERSION} \ --file container/registry/mod_auth_openidc/Dockerfile .
...