private Image( ManifestFormat imageFormat, Instant created, string architecture, string os, ImageLayers layers, ImmutableArray <HistoryEntry> history, ImmutableDictionary <string, string> environment, ImmutableArray <string>?entrypoint, ImmutableArray <string>?programArguments, DockerHealthCheck healthCheck, ImmutableHashSet <Port> exposedPorts, ImmutableHashSet <AbsoluteUnixPath> volumes, ImmutableDictionary <string, string> labels, string workingDirectory, string user) { this.imageFormat = imageFormat; this.created = created; this.architecture = architecture; this.os = os; this.layers = layers; this.history = history; this.environment = environment; this.entrypoint = entrypoint; this.programArguments = programArguments; this.healthCheck = healthCheck; this.exposedPorts = exposedPorts; this.volumes = volumes; this.labels = labels; this.workingDirectory = workingDirectory; this.user = user; }
/** * Adds all layers in {@code layers}. * * @param layers the layers to add * @return this * @throws LayerPropertyNotFoundException if adding a layer fails */ public Builder AddAll(ImageLayers layers) { layers = layers ?? throw new ArgumentNullException(nameof(layers)); foreach (ILayer layer in layers) { Add(layer); } return(this); }