/// <summary> /// Configure the container to use the "journald" logging driver. /// </summary> /// <param name="parameters"> /// The container-creation parameters. /// </param> /// <returns> /// The container-creation parameters (enables method-chaining). /// </returns> public static CreateContainerParameters UseJournaldLogger(this CreateContainerParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } HostConfig hostConfig = parameters.HostConfig ?? (parameters.HostConfig = new HostConfig()); LogConfig logConfig = hostConfig.EnsureLogConfig(); logConfig.Type = "journald"; logConfig.Config.Clear(); return(parameters); }