2019-03-25 00:27:14 +00:00
|
|
|
package environment
|
|
|
|
|
|
|
|
import (
|
2019-03-25 01:00:21 +00:00
|
|
|
"github.com/pterodactyl/wings"
|
|
|
|
"os"
|
2019-03-25 00:27:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Docker struct {
|
2019-03-25 01:00:21 +00:00
|
|
|
*Controller
|
2019-03-25 00:27:14 +00:00
|
|
|
|
2019-03-25 01:00:21 +00:00
|
|
|
// Defines the configuration for the Docker instance that will allow us to connect
|
|
|
|
// and create and modify containers.
|
|
|
|
Configuration wings.DockerConfiguration
|
2019-03-25 00:27:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Ensure that the Docker environment is always implementing all of the methods
|
|
|
|
// from the base environment interface.
|
|
|
|
var _ Environment = (*Docker)(nil)
|
|
|
|
|
|
|
|
func (d *Docker) Exists() bool {
|
2019-03-25 01:00:21 +00:00
|
|
|
return true
|
2019-03-25 00:27:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (d *Docker) Start() error {
|
2019-03-25 01:00:21 +00:00
|
|
|
return nil
|
2019-03-25 00:27:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (d *Docker) Stop() error {
|
2019-03-25 01:00:21 +00:00
|
|
|
return nil
|
2019-03-25 00:27:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (d *Docker) Terminate(signal os.Signal) error {
|
2019-03-25 01:00:21 +00:00
|
|
|
return nil
|
2019-03-25 00:27:14 +00:00
|
|
|
}
|