canonical / canonical/ubuntu-cloud-docs

Improve Dockerfile installation to recommend installing systemd-detect-virt

Open
#320 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
24
Forks
67
Avg merge
3d 7h
Merged PRs (30d)
22

Description

*Please describe the question or issue you're facing with "How to enable Ubuntu Pro Services in a Dockerfile - Ubuntu on OCI registries documentation".*

https://github.com/canonical/ubuntu-pro-client/blob/0571604c4ba715342890104703b8435972446061/uaclient/system.py#L247

The pro client relies on systemd-virt-detect as the primary virtualization detection tool. The fallback is looking for magic strings. It would be useful for the Dockerfile use case to document that installing systemd temporarily can help with the detection. It would be even better to improve the client to be able to call it like:

```
pro attach --assert-virt docker
```

This would fail if the detection does not match docker. The command could then be dropped in the Dockerfile and give appropriate error message if detection fails to find docker.

---
*Reported from: https://documentation.ubuntu.com/oci-registries/en/latest/oci-how-to/enable-pro-services/*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.