mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Set the HOME environment variable for sub-containers.
Fixes #701 PiperOrigin-RevId: 316025635
This commit is contained in:
@@ -113,6 +113,17 @@ func (cc *Crictl) Exec(contID string, args ...string) (string, error) {
|
||||
return output, nil
|
||||
}
|
||||
|
||||
// Logs retrieves the container logs. It corresponds to `crictl logs`.
|
||||
func (cc *Crictl) Logs(contID string, args ...string) (string, error) {
|
||||
a := []string{"logs", contID}
|
||||
a = append(a, args...)
|
||||
output, err := cc.run(a...)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("logs failed: %v", err)
|
||||
}
|
||||
return output, nil
|
||||
}
|
||||
|
||||
// Rm removes a container. It corresponds to `crictl rm`.
|
||||
func (cc *Crictl) Rm(contID string) error {
|
||||
_, err := cc.run("rm", contID)
|
||||
|
||||
Reference in New Issue
Block a user