QA for OCI Images
OCI Images (or 'docker images') are built by Launchpad from an OCI project and recipe.
These build OCI ('docker') images, they are closely related to the snap package builds, but different enough to need separate testing. They require a git repository with an appropriate Dockerfile to already exist. This can be used.
Create an OCI project under a distribution that supports OCI. This is a good candidate.
- Create a recipe for this OCI Project, using 'Create OCI recipe'
- Fill in the details of the recipe and the source git repository. Any architecture that has docker in the archive should work.
- You can add a push rule / credentials once the recipe is created, if you need to test the OCI image being pushed to a registry.
- Request a build of this recipe.
Testing the image
Launchpad is a lot more involved in the build process for an OCI image than an equivalent snap or binary package. As such, it is important to test any changes to ensure that the image is still valid.
If the image has been pushed to an OCI registry, you can test it by installing docker (snap install docker), and doing
docker pull <registry>/<image name> docker run <image name
This will ensure the manifest is valid enough to be pulled and started. Any further investigation will be dependent on the type of image/app.
microk8s is more strict about the manifest that it will accept on pull, which has caused some problems in the past.
snap install microk8s and configure
- Create the following deployment yaml
apiVersion: v1 kind: Pod metadata: name: postgresql spec: containers: - image: <image name>:edge name: <pod name>
microk8s kubectl apply deployment.yaml
microk8s kubectl get pods
microk8s kubectl describe <pod>