oci-register-machine

command module
v0.0.0-...-66691c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

README

Systemd RegisterMachine

Systemd-machined is a virtual machine and container registration manager. It is a tiny daemon that tracks locally running virtual machines and containers and the processes belonging to them.

This project produces a golang binary that can be used with Docker (with minor code changes). If you clone this branch and build/install register-machine.go, a binary will be placed in /usr/libexec/oci/hooks.d named oci-register-machine. You can change this location by editing HOOKSDIR in the Makefile.

With minor changes to Docker code, this binary will be executed when starting and stopping Docker containers via prestart and poststop hooks. RegisterMachine() and TerminateMachine() are systemd-machined.service methods. These and other methods are described here: systemd-machined freedesktop.org

Running Docker containers with this executable, RegisterMachine() is called just before a container is started and after it is provisioned. All running containers' IDs will be listed when you run the command machinectl or machinectl list. When containers are stopped/exited, TerminateMachine() is called, all container processes are terminated and the container ID is no longer listed in machinectl output.

This doc assumes you are running at least docker version 1.9 with the dockerhooks patch. Also, place this project in your GOPATH.

To build, install, clean-up:

First, clone this branch in your GOPATH, then:

make build

make install

make clean

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/godbus/dbus
Package dbus implements bindings to the D-Bus message bus system.
Package dbus implements bindings to the D-Bus message bus system.
_workspace/src/gopkg.in/yaml.v1
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL