Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocre cli #34

Open
gonzolively opened this issue Jan 8, 2025 · 5 comments
Open

ocre cli #34

gonzolively opened this issue Jan 8, 2025 · 5 comments
Assignees

Comments

@gonzolively
Copy link
Collaborator

gonzolively commented Jan 8, 2025

We will need an Ocre CLI for basic container management functions. Namely, uploading images to a container registry.

Example of how this could be implemented for ocre push

ocre push <container_file_location> [options]

Options:
  -r, --registry <url>      Registry URL (required)
  -t, --tag <tag>          Container tag (default: "latest")
  -n, --name <name>        Container name (default: inferred from filename)
  -d, --description <text> Container description
  -f, --force              Force push even if tag exists
  -q, --quiet             Suppress detailed output
  --no-verify             Skip container validation before push
  -h, --help              Show help information

Examples:
  ocre push myapp.ocre -r registry.example.com 
  ocre push myapp.ocre -r registry.example.com -t v1.0 -d "My embedded application"
@johnwalicki
Copy link

Developers already have built up years of muscle memory using OCI / Docker / podman commands. The ocre cli syntax should try to mimic it (when appropriate), especially if Ocre wants to be a container mgmt system for MCUs.

@gonzolively gonzolively added this to Ocre Jan 17, 2025
@gonzolively gonzolively removed this from Ocre Jan 17, 2025
@gonzolively
Copy link
Collaborator Author

Other possible command:

ocre run - Ability to pull containers down/run on the device.

@gonzolively
Copy link
Collaborator Author

gonzolively commented Jan 30, 2025

Other possible command:

  • ocre list - List containers in the specified registry.

@gonzolively gonzolively added the P1 label Jan 30, 2025
@PatrickRobbIOL
Copy link
Collaborator

Hi. I went through the docker cli commands to see which ones seem like core cli requirements - at least based on my experience running projects which leverage containerization.

  1. run Create and run a new container from an image (Mentioned in a previous issue - and I understand ocre run is a combination of docker pull and docker run)
  2. login Authenticate to a registry
  3. logout Log out from a registry
  4. network Manage networks (will ocre allow multiple container runtime networks like docker, or just 1 default one?)
  5. stop Stop one or more running containers
  6. start Start one or more stopped containers

I do not raise these because I require them for the testing we want to run at the UNH lab (well, except for run and maybe network), but rather to start a conversation. Maybe we can have that conversation at the next meeting? I will be interested in understanding better which commands are needed and which are not - based on the ocre use case vs the docker use case.

@johnwalicki
Copy link

@PatrickRobbIOL - Agree with your list but caution that the docker/podman container network configuration is quite sophisticated. Container network isolation is non-trivial. I'd probably suggest deferring that into a future feature. Initially, ocre network inspect might list the underlying Zephyr network info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants