Пример #1
0
        public static void DockerLogs(this ICakeContext context, DockerContainerLogsSettings settings, string container)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            var runner = new GenericDockerRunner <DockerContainerLogsSettings>(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools);

            runner.Run("start", settings ?? new DockerContainerLogsSettings(), new string[] { container });
        }
Пример #2
0
        public static IEnumerable <string> DockerLogs(this ICakeContext context, DockerContainerLogsSettings settings, string container)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            var runner = new GenericDockerRunner <DockerContainerLogsSettings>(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools);

            return(runner.RunWithResult("logs", settings ?? new DockerContainerLogsSettings(), r => r.ToArray(), new string[] { container }));
        }