Documentation ¶
Overview ¶
Package dockeropts provides various methods to modify docker service start arguments (a.k.a DOCKER_OPTS)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
Editor describes an implementation that can take a init config for docker service and modify the start arguments and return the new init config contents.
type SystemdUnitEditor ¶
type SystemdUnitEditor struct{}
SystemdUnitEditor modifies the 'ExecStart=' line as 'ExecStart=/usr/bin/docker $args'. If ExecStart line does not exist, returns error.
func (SystemdUnitEditor) ChangeOpts ¶
func (e SystemdUnitEditor) ChangeOpts(contents, args string) (string, error)
type UpstartCfgEditor ¶
type UpstartCfgEditor struct{}
UpstartCfgEditor finds the line that contains 'DOCKER_OPTS=' and replaces with the given args. If not found, appends a new line with given configuration.
func (UpstartCfgEditor) ChangeOpts ¶
func (e UpstartCfgEditor) ChangeOpts(contents, args string) (string, error)
Click to show internal directories.
Click to hide internal directories.