Installing and configuring the container image
IBM Open Enterprise SDK for Python is available as an image on the IBM Cloud Container Registry (icr.io) for use on z/OS in conjunction with the IBM z/OS Container Platform (zOSCP). If zOSCP is installed, IBM Open Enterprise SDK for Python can be utilized in a container instance. Use this procedure to configure the container file.
To use IBM Open Enterprise SDK for Python in the container instance, perform the following steps:
- Create a Containerfile:
- Choose the version of z/OS and IBM Open Enterprise SDK for Python and the "latest" version is
recommended:
FROM zos:latest COPY --from=python:latest /python /python - Set base work directory within the container:
WORKDIR /app - Command to run on container
initialization:
CMD ["/python/bin/python3", "-c", "print('Hello, world!')"] - The Containerfile is created. You should be able to utilize IBM Open
Enterprise SDK for Python image in the container instance, for example, by
executing:
podman build -t <name of image> . podman run --rm <name of image>Note: The IBM Open Enterprise SDK for Python container images are signed. To verify the signature, follow the instructions in this blog.
- Choose the version of z/OS and IBM Open Enterprise SDK for Python and the "latest" version is
recommended:
- To acquire the IBM Open Enterprise SDK for Python container image from the IBM Cloud Registry
(icr.io) with an entitlement key,
execute the following steps:
- Use the
skopeocommand to copy the IBM Open Enterprise SDK for Python image from IBM Cloud Registry to your private registry.
whereskopeo copy docker://icr.io/zoscp/python:latest docker://registry/[directory] --src-creds iamapikey:<entitlement key> --dest-creds XX:XXXX:XXis the private local registry credential (user ID : password) andregistryis the private local registry name. Alternatively, Podman could be used to pull the IBM Open Enterprise SDK for Python image. - To use Podman to copy the IBM Open Enterprise SDK for Python image locally from
icr.io in your own images with the following
command:
If you have any issues copying or pulling the image from IBM Cloud Registry, open a case against the IBM z/OS Container Platform product with Program ID 5655-MC3.podman login –u iamapikey –p <entitlement key> docker://icr.io podman pull docker://icr.io/zoscp/python:latestNote: The skopeo and podman commands assume the policy.json file allows images to be accepted from icr.io and stored to your private registry. In addition, the SSL_CERT_FILE environment variable needs to be set appropriately. See Set up TLS to securely connect to image registries for details.
- Use the