DockerShell class

When running on Docker we are often proc1 i.e. the one and only process running docker. There may not even be a shell present in the image.

Implemented types
Mixed-in types

Constructors

DockerShell.withPid(int? pid)
Attached to a bash shell with the given pid.

Properties

canModifyPath → bool
Returns true if this shell supports modifying the shell's PATH
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
hasStartScript → bool
True if this shell supports a start script or configuration file. e.g. a script that is run by the shell or a configuration file that is read when the shell starts.
no setteroverride
installInstructions → String
Returns instructions on how to install DCli.
no setteroverride
isCompletionInstalled → bool
Returns true if the dcil_complete has been installed as a bash auto completer
no setteroverride
isCompletionSupported → bool
no setteroverride
isPrivilegedPasswordRequired → bool
Returns true if running a privileged action would cause a password to be requested.
no setterinherited
isPrivilegedProcess → bool
only user in docker is root.
no setteroverride
isPrivilegedUser → bool
only user in docker is root.
no setteroverride
isSudo → bool
Returns true if we are currently running under sudo.
no setterinherited
loggedInUser → String
Returns the username of the logged in user.
no setteroverride
loggedInUsersHome → String
Attempts to retrive the logged in user's home directory.
no setteroverride
name → String
The name of the shell e.g. bash
no setteroverride
nonPriviledgedUser → Immutable<UserEnvironment>
latefinalinherited
pathToStartScript → String
Throws UnsupportedError. @Throwing(UnsupportedError)
no setteroverride
pid → int?
The pid of the current shell
final
priviledgedUser → Immutable<UserEnvironment>
latefinalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startScriptName → String
Throws UnsupportedError. @Throwing(UnsupportedError)
no setteroverride

Methods

addFileAssocation(String dcliPath) → void
Called during the install so that an OS that needs to create a file association between .dart and dcli can create that association. The implementor is responsible for not adding the association if it already exists.
override
appendToPATH(String path) → bool
Appends the given path to the bash path if it isn't already on the path. Throws UnsupportedError. @Throwing(UnsupportedError)
override
checkInstallPreconditions() → String?
at this point no posix system has any preconditions.
inherited
install({bool installDart = false, bool activate = true}) → Future<bool>
Install dart/dcli
inherited
installTabCompletion({bool quiet = false}) → void
Throws UnsupportedError. @Throwing(UnsupportedError)
override
matchByName(String name) → bool
Returns true if the shells name matches the passed name. The comparison is case insensitive.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prependToPATH(String path) → bool
Prepends the given path to the bash path if it isn't already on the path. Throws UnsupportedError. @Throwing(UnsupportedError)
override
privilegesRequiredMessage(String app) → String
The message used during installation if it needs to be run with sudo.
inherited
releasePrivileges() → void
no op on docker as we are always root.
override
restorePrivileges() → void
no op on docker as we are always root.
override
toString() → String
A string representation of this object.
inherited
withPrivileges(RunPrivileged action, {bool allowUnprivileged = false}) → void
Run action On docker we don't have to manipulate the privlieges as we are aways root.
override
withPrivilegesAsync(RunPrivilegedAsync action, {bool allowUnprivileged = false}) → Future<void>
Identical to withPrivileges but allows you to run an async action.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

inDocker → bool
Returns true if we are running in a docker shell @Throwing(ArgumentError)
no setter

Constants

shellName → const String
Name of the shell