public function login($username, $password, $server = null) {

		$this->requireProcess();

		$commandArguments = [
            'docker',
            'login',
            '-u',
            $username,
            '--password-stdin'
		];
		if( !empty($server) )
			$commandArguments[] = $server;
		$process = ProcessBuilder::create( $commandArguments )
			->setTimeout(null)->getProcess();
        $process->setInput($password);

		$this->processHelper->run($this->output, $process, null, null, OutputInterface::VERBOSITY_VERY_VERBOSE);

		if($process->getExitCode() !== 0)
			throw new LoginFailedException("Login failed", 21);
	}