Build containers from terminal
This section shows how to build containers manually from dockerfiles present in your Intel® Developer Cloud for the Edge filesystem inside the JupyterLab interface. Containers built in your JupyterLab terminal session can then be pushed to your private registry associated with your Intel® Developer Cloud for the Edge Container Playground account to test on various Intel Platforms.
Navigate to CLI
Use the top navigation menu to access the Coding Environment to open the JupyterLab interface in a new browser tab. Use the + button from the JupyterLab file browser to open a Terminal from the Launcher.
If you not able to access the JupyterLab interface, make sure to Allow Pop-ups in your browser.
Build a Container
Use the JupyterLab terminal to build the container with buildah:
buildah bud --format docker -f DOCKERFILE_NAME.Dockerfile -t CONTAINER_NAME:CONTAINER_TAG .
The list of containers built from the JupyterLab interface can be viewed with the buildah images command. You can also run buildah bud --format docker -t CONTAINER_NAME:CONTAINER_TAG . inside the directory containing the file .Dockerfile.
Push to Private Registry
You must retag your container to begin with the private registry URL associated with your Intel® Developer Cloud for the Edge account. Use the environment variable $REGISTRY_URL to rename your container.
buildah tag CONTAINER_NAME:CONTAINER_TAG $REGISTRY_URL/CONTAINER_NAME:CONTAINER_TAG
To run and test the containers built in the JupyterLab interface inside a project in the container playground portal push your retagged container with the below command.
buildah push $REGISTRY_URL/CONTAINER_NAME:CONTAINER_TAG
See Configure imported containers and Select Hardware and Launch Containers to launch.
Customize a Sample Application
Your Intel® Developer Cloud for the Edge storage filesystem includes the latest source code for the sample applications hosted on Intel® Developer Cloud for the Edge Marketplace. Each sample includes detailed instructions on:
How it Works?
Supported Runtime Configurations
Build and Run commands on Intel® Developer Cloud for the Edge Container Playground and your local system
The View/Edit Code option from the Marketplace opens up the readme for each sample in the JupyterLab environment. You can also visit the public repository:
Sample Readme residing in the directory for each sample application
Create and navigate inside a working directory: mkdir cli-example && cd cli-example
Write a dockerfile for a lightweight container that prints numbers: (echo FROM python:slim && echo 'ENTRYPOINT [ "seq", "30"]') > Dockerfile
Build the container while including private registry url: buildah bud --format docker -t $REGISTRY_URL/cli-example:latest
Push the container to assign a project and launch: buildah push $REGISTRY_URL/cli-example:latest