github.com/containerd/nerdctl@v1.7.7/pkg/api/types/builder_types.go (about) 1 /* 2 Copyright The containerd Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package types 18 19 import "io" 20 21 // BuilderBuildOptions specifies options for `nerdctl (image/builder) build`. 22 type BuilderBuildOptions struct { 23 Stdin io.Reader 24 Stdout io.Writer 25 Stderr io.Writer 26 // GOptions is the global options 27 GOptions GlobalCommandOptions 28 // BuildKitHost is the buildkit host 29 BuildKitHost string 30 // Tag is the tag of the image 31 Tag []string 32 // File Name of the Dockerfile 33 File string 34 // Target is the target of the build 35 Target string 36 // BuildArgs is the build-time variables 37 BuildArgs []string 38 // NoCache disables cache 39 NoCache bool 40 // Output is the output destination 41 Output string 42 // Progress Set type of progress output (auto, plain, tty). Use plain to show container output 43 Progress string 44 // Secret file to expose to the build: id=mysecret,src=/local/secret 45 Secret []string 46 // Allow extra privileged entitlement, e.g. network.host, security.insecure 47 Allow []string 48 // SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]]) 49 SSH []string 50 // Quiet suppress the build output and print image ID on success 51 Quiet bool 52 // CacheFrom external cache sources (eg. user/app:cache, type=local,src=path/to/dir) 53 CacheFrom []string 54 // CacheTo cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir) 55 CacheTo []string 56 // Rm remove intermediate containers after a successful build 57 Rm bool 58 // Platform set target platform for build (e.g., "amd64", "arm64") 59 Platform []string 60 // IidFile write the image ID to the file 61 IidFile string 62 // Label is the metadata for an image 63 Label []string 64 // BuildContext is the build context 65 BuildContext string 66 // NetworkMode mode for the build context 67 NetworkMode string 68 } 69 70 // BuilderPruneOptions specifies options for `nerdctl builder prune`. 71 type BuilderPruneOptions struct { 72 Stderr io.Writer 73 // GOptions is the global options 74 GOptions GlobalCommandOptions 75 // BuildKitHost is the buildkit host 76 BuildKitHost string 77 // All will remove all unused images and all build cache, not just dangling ones 78 All bool 79 }