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
It is possible to use CI's mechanisms to build a container image manually providing a `Dockerfile`, or even a full build context with a `Dockerfile`.
602
+
For reproducibility one should aim to use a code versioning system like `git`, but for debugging a manual API call might not pollute the code history so much.
603
+
604
+
To use the API endpoint you need to create API credentials (one time setup) using the developer portal. Please follow [this guide][ref-devportal].
605
+
To be able to use manual API container builds you must subscribe your application to the `ciext-container-builder` API.
606
+
607
+
After your application is created the tab `APIs` will appear at the top of the developer portal, which allows you to inspect the API for `ciext-container-builder`.
608
+
The section `Documents` is very helpful as it contains the endpoint documentation for `/container/build POST`.
609
+
Refer to the documentation there for all parameters.
610
+
611
+
The endpoint can work in two different modes:
612
+
613
+
1. Send just a Dockerfile
614
+
1. Send a full build context as a tar.gz-archive and tell the API where the Dockerfile inside the tarball is.
615
+
616
+
!!! info "Create access token"
617
+
To send any request to the API endpoint, we first need to create an access token, which can be done with the Consumer Key and Consumer secret.
It is mandatory to specify for which architecture you want to build the container. Valid choices are:
629
+
630
+
* `x86_64` - Correct for all nodes that are not Grace-Hopper
631
+
* `aarch64` - ARM architecture - Correct for Grace-Hopper
632
+
633
+
The API call above sends the Dockerfile to the server, and the server will reply with a link, where you can see the build log.
634
+
The final container image will be pushed to JFrog, a CSCS internal container registry.
635
+
Once the container image is built, it can be pulled from any CSCS machine.
636
+
637
+
If you want to push the image to your Docker Hub account, you need to create a Docker Hub access token with write permissions, and then use the API call (similarly for other OCI registry providers)
0 commit comments