podman 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/dist/commands/build.d.ts +238 -0
- package/dist/commands/push.d.ts +45 -0
- package/dist/commands/run.d.ts +322 -0
- package/dist/commands/start-machine.d.ts +79 -0
- package/dist/commands/tag.d.ts +29 -0
- package/dist/index.d.ts +5 -732
- package/dist/index.js +207 -170
- package/dist/lib/spawn.d.ts +122 -0
- package/package.json +1 -1
- /package/dist/{arg-builder.d.ts → lib/arg-builder.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,732 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
addHost?: string | string[];
|
|
7
|
-
/** Attempt to build for all base image platforms. */
|
|
8
|
-
allPlatforms?: boolean;
|
|
9
|
-
/** Set metadata for an image. */
|
|
10
|
-
annotation?: string | string[];
|
|
11
|
-
/** Set the ARCH of the image to the provided value instead of the architecture of the host. */
|
|
12
|
-
arch?: string;
|
|
13
|
-
/** Path of the authentication file. */
|
|
14
|
-
authfile?: string;
|
|
15
|
-
/** Argument=value to supply to the builder. */
|
|
16
|
-
buildArg?: string | string[];
|
|
17
|
-
/** Argfile.conf containing lines of argument=value to supply to the builder. */
|
|
18
|
-
buildArgFile?: string;
|
|
19
|
-
/** Argument=value to supply additional build context to the builder. */
|
|
20
|
-
buildContext?: string | string[];
|
|
21
|
-
/** Remote repository list to utilise as potential cache source. */
|
|
22
|
-
cacheFrom?: string | string[];
|
|
23
|
-
/** Remote repository list to utilise as potential cache destination. */
|
|
24
|
-
cacheTo?: string | string[];
|
|
25
|
-
/** Only consider cache images under specified duration. */
|
|
26
|
-
cacheTtl?: string;
|
|
27
|
-
/** Add the specified capability when running. */
|
|
28
|
-
capAdd?: string | string[];
|
|
29
|
-
/** Drop the specified capability when running. */
|
|
30
|
-
capDrop?: string | string[];
|
|
31
|
-
/** Use certificates at the specified path to access the registry. */
|
|
32
|
-
certDir?: string;
|
|
33
|
-
/** Optional parent cgroup for the container. */
|
|
34
|
-
cgroupParent?: string;
|
|
35
|
-
/** 'private', or 'host'. */
|
|
36
|
-
cgroupns?: string;
|
|
37
|
-
/** Preserve the contents of VOLUMEs during RUN instructions. */
|
|
38
|
-
compatVolumes?: boolean;
|
|
39
|
-
/** Set additional flag to pass to C preprocessor (cpp). */
|
|
40
|
-
cppFlag?: string | string[];
|
|
41
|
-
/** Limit the CPU CFS (Completely Fair Scheduler) period. */
|
|
42
|
-
cpuPeriod?: number;
|
|
43
|
-
/** Limit the CPU CFS (Completely Fair Scheduler) quota. */
|
|
44
|
-
cpuQuota?: number;
|
|
45
|
-
/** CPU shares (relative weight). */
|
|
46
|
-
cpuShares?: number;
|
|
47
|
-
/** CPUs in which to allow execution (0-3, 0,1). */
|
|
48
|
-
cpusetCpus?: string;
|
|
49
|
-
/** Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. */
|
|
50
|
-
cpusetMems?: string;
|
|
51
|
-
/** Set an "org.opencontainers.image.created" annotation in the image. */
|
|
52
|
-
createdAnnotation?: boolean;
|
|
53
|
-
/** Use username[:password] for accessing the registry. */
|
|
54
|
-
creds?: string;
|
|
55
|
-
/** Key needed to decrypt the image. */
|
|
56
|
-
decryptionKey?: string | string[];
|
|
57
|
-
/** Additional devices to provide. */
|
|
58
|
-
device?: string | string[];
|
|
59
|
-
/** Do not compress layers by default. */
|
|
60
|
-
disableCompression?: boolean;
|
|
61
|
-
/** Set custom DNS servers or disable it completely by setting it to 'none'. */
|
|
62
|
-
dns?: string;
|
|
63
|
-
/** Set custom DNS options. */
|
|
64
|
-
dnsOption?: string | string[];
|
|
65
|
-
/** Set custom DNS search domains. */
|
|
66
|
-
dnsSearch?: string | string[];
|
|
67
|
-
/** Set environment variable for the image. */
|
|
68
|
-
env?: string | string[];
|
|
69
|
-
/** Pathname or URL of a Dockerfile. */
|
|
70
|
-
file?: string;
|
|
71
|
-
/** Always remove intermediate containers after a build, even if the build is unsuccessful. */
|
|
72
|
-
forceRm?: boolean;
|
|
73
|
-
/** Format of the built image's manifest and metadata. */
|
|
74
|
-
format?: string;
|
|
75
|
-
/** Image name used to replace the value in the first FROM instruction in the Containerfile. */
|
|
76
|
-
from?: string;
|
|
77
|
-
/** Add additional groups to the primary container process. */
|
|
78
|
-
groupAdd?: string | string[];
|
|
79
|
-
/** Set the OCI hooks directory path (may be set multiple times). */
|
|
80
|
-
hooksDir?: string | string[];
|
|
81
|
-
/** Pass through HTTP Proxy environment variables. */
|
|
82
|
-
httpProxy?: boolean;
|
|
83
|
-
/** Add default identity label. */
|
|
84
|
-
identityLabel?: boolean;
|
|
85
|
-
/** Path to an alternate .dockerignore file. */
|
|
86
|
-
ignorefile?: string;
|
|
87
|
-
/** File to write the image ID to. */
|
|
88
|
-
iidfile?: string;
|
|
89
|
-
/** Inherit the annotations from the base image or base stages. */
|
|
90
|
-
inheritAnnotations?: boolean;
|
|
91
|
-
/** Inherit the labels from the base image or base stages. */
|
|
92
|
-
inheritLabels?: boolean;
|
|
93
|
-
/** 'private', path of IPC namespace to join, or 'host'. */
|
|
94
|
-
ipc?: string;
|
|
95
|
-
/** Type of process isolation to use. */
|
|
96
|
-
isolation?: string;
|
|
97
|
-
/** How many stages to run in parallel. */
|
|
98
|
-
jobs?: number;
|
|
99
|
-
/** Set metadata for an image. */
|
|
100
|
-
label?: string | string[];
|
|
101
|
-
/** Set metadata for an intermediate image. */
|
|
102
|
-
layerLabel?: string | string[];
|
|
103
|
-
/** Use intermediate layers during build. */
|
|
104
|
-
layers?: boolean;
|
|
105
|
-
/** Log to file instead of stdout/stderr. */
|
|
106
|
-
logfile?: string;
|
|
107
|
-
/** Add the image to the specified manifest list. */
|
|
108
|
-
manifest?: string;
|
|
109
|
-
/** Memory limit (format: <number><unit>, where unit = b, k, m or g). */
|
|
110
|
-
memory?: string;
|
|
111
|
-
/** Swap limit equal to memory plus swap: '-1' to enable unlimited swap. */
|
|
112
|
-
memorySwap?: string;
|
|
113
|
-
/** 'private', 'none', 'ns:path' of network namespace to join, or 'host'. */
|
|
114
|
-
network?: string;
|
|
115
|
-
/** Do not use existing cached images for the container build. */
|
|
116
|
-
noCache?: boolean;
|
|
117
|
-
/** Do not create new /etc/hostname file for RUN instructions, use the one from the base image. */
|
|
118
|
-
noHostname?: boolean;
|
|
119
|
-
/** Do not create new /etc/hosts file for RUN instructions, use the one from the base image. */
|
|
120
|
-
noHosts?: boolean;
|
|
121
|
-
/** Omit build history information from built image. */
|
|
122
|
-
omitHistory?: boolean;
|
|
123
|
-
/** Set the OS to the provided value instead of the current operating system of the host. */
|
|
124
|
-
os?: string;
|
|
125
|
-
/** Set required OS feature for the target image in addition to values from the base image. */
|
|
126
|
-
osFeature?: string;
|
|
127
|
-
/** Set required OS version for the target image instead of the value from the base image. */
|
|
128
|
-
osVersion?: string;
|
|
129
|
-
/** Private, path of PID namespace to join, or 'host'. */
|
|
130
|
-
pid?: string;
|
|
131
|
-
/** Set the OS/ARCH[/VARIANT] of the image to the provided value instead of the current OS/ARCH. */
|
|
132
|
-
platform?: string;
|
|
133
|
-
/** Pull image policy ("always"|"missing"|"never"|"newer"). */
|
|
134
|
-
pull?: string;
|
|
135
|
-
/** Refrain from announcing build instructions and image read/write progress. */
|
|
136
|
-
quiet?: boolean;
|
|
137
|
-
/** Number of times to retry in case of failure when performing push/pull. */
|
|
138
|
-
retry?: number;
|
|
139
|
-
/** Delay between retries in case of push/pull failures. */
|
|
140
|
-
retryDelay?: string;
|
|
141
|
-
/** Set timestamps in layers to no later than the value for --source-date-epoch. */
|
|
142
|
-
rewriteTimestamp?: boolean;
|
|
143
|
-
/** Remove intermediate containers after a successful build. */
|
|
144
|
-
rm?: boolean;
|
|
145
|
-
/** Add global flags for the container runtime. */
|
|
146
|
-
runtimeFlag?: string | string[];
|
|
147
|
-
/** Scan working container using preset configuration. */
|
|
148
|
-
sbom?: string;
|
|
149
|
-
/** Add scan results to image as path. */
|
|
150
|
-
sbomImageOutput?: string;
|
|
151
|
-
/** Add scan results to image as path. */
|
|
152
|
-
sbomImagePurlOutput?: string;
|
|
153
|
-
/** Merge scan results using strategy. */
|
|
154
|
-
sbomMergeStrategy?: string;
|
|
155
|
-
/** Save scan results to file. */
|
|
156
|
-
sbomOutput?: string;
|
|
157
|
-
/** Save scan results to file. */
|
|
158
|
-
sbomPurlOutput?: string;
|
|
159
|
-
/** Scan working container using command in scanner image. */
|
|
160
|
-
sbomScannerCommand?: string;
|
|
161
|
-
/** Scan working container using scanner command from image. */
|
|
162
|
-
sbomScannerImage?: string;
|
|
163
|
-
/** Secret file to expose to the build. */
|
|
164
|
-
secret?: string | string[];
|
|
165
|
-
/** Security options. */
|
|
166
|
-
securityOpt?: string | string[];
|
|
167
|
-
/** Size of '/dev/shm'. The format is <number><unit>. */
|
|
168
|
-
shmSize?: string;
|
|
169
|
-
/** Skips stages in multi-stage builds which do not affect the final target. */
|
|
170
|
-
skipUnusedStages?: boolean;
|
|
171
|
-
/** Set new timestamps in image info to seconds after the epoch. */
|
|
172
|
-
sourceDateEpoch?: number;
|
|
173
|
-
/** Squash all image layers into a single layer. */
|
|
174
|
-
squash?: boolean;
|
|
175
|
-
/** Squash all layers into a single layer. */
|
|
176
|
-
squashAll?: boolean;
|
|
177
|
-
/** SSH agent socket or keys to expose to the build. */
|
|
178
|
-
ssh?: string | string[];
|
|
179
|
-
/** Pass stdin into containers. */
|
|
180
|
-
stdin?: boolean;
|
|
181
|
-
/** Tagged name to apply to the built image. */
|
|
182
|
-
tag?: string | string[];
|
|
183
|
-
/** Set the target build stage to build. */
|
|
184
|
-
target?: string;
|
|
185
|
-
/** Set new timestamps in image info and layer to seconds after the epoch. */
|
|
186
|
-
timestamp?: number;
|
|
187
|
-
/** Ulimit options. */
|
|
188
|
-
ulimit?: string | string[];
|
|
189
|
-
/** Unset annotation when inheriting annotations from base image. */
|
|
190
|
-
unsetannotation?: string | string[];
|
|
191
|
-
/** Unset environment variable from final image. */
|
|
192
|
-
unsetenv?: string | string[];
|
|
193
|
-
/** Unset label when inheriting labels from base image. */
|
|
194
|
-
unsetlabel?: string | string[];
|
|
195
|
-
/** 'container', path of user namespace to join, or 'host'. */
|
|
196
|
-
userns?: string;
|
|
197
|
-
/** ContainerGID:hostGID:length GID mapping to use in user namespace. */
|
|
198
|
-
usernsGidMap?: string;
|
|
199
|
-
/** Name of entries from /etc/subgid to use to set user namespace GID mapping. */
|
|
200
|
-
usernsGidMapGroup?: string;
|
|
201
|
-
/** ContainerUID:hostUID:length UID mapping to use in user namespace. */
|
|
202
|
-
usernsUidMap?: string;
|
|
203
|
-
/** Name of entries from /etc/subuid to use to set user namespace UID mapping. */
|
|
204
|
-
usernsUidMapUser?: string;
|
|
205
|
-
/** Private, :path of UTS namespace to join, or 'host'. */
|
|
206
|
-
uts?: string;
|
|
207
|
-
/** Override the variant of the specified image. */
|
|
208
|
-
variant?: string;
|
|
209
|
-
/** Bind mount a volume into the container. */
|
|
210
|
-
volume?: string | string[];
|
|
211
|
-
};
|
|
212
|
-
type PodmanPushOptions = {
|
|
213
|
-
/** Source image to push. */
|
|
214
|
-
image: string;
|
|
215
|
-
/** Destination to push the image to. */
|
|
216
|
-
destination?: string;
|
|
217
|
-
/** Path of the authentication file. */
|
|
218
|
-
authfile?: string;
|
|
219
|
-
/** Compression format to use. */
|
|
220
|
-
compressionFormat?: string;
|
|
221
|
-
/** Compression level to use. */
|
|
222
|
-
compressionLevel?: number;
|
|
223
|
-
/** Credentials (USERNAME:PASSWORD) to use for authenticating to a registry. */
|
|
224
|
-
creds?: string;
|
|
225
|
-
/** Write the digest of the pushed image to the specified file. */
|
|
226
|
-
digestfile?: string;
|
|
227
|
-
/** This is a Docker specific option and is a NOOP. */
|
|
228
|
-
disableContentTrust?: boolean;
|
|
229
|
-
/** Use the specified compression algorithm even if the destination contains a differently-compressed variant already. */
|
|
230
|
-
forceCompression?: boolean;
|
|
231
|
-
/** Manifest type (oci, v2s2, or v2s1) to use in the destination. */
|
|
232
|
-
format?: string;
|
|
233
|
-
/** Discard any pre-existing signatures in the image. */
|
|
234
|
-
removeSignatures?: boolean;
|
|
235
|
-
/** Number of times to retry in case of failure when performing push. */
|
|
236
|
-
retry?: number;
|
|
237
|
-
/** Delay between retries in case of push failures. */
|
|
238
|
-
retryDelay?: string;
|
|
239
|
-
/** Require HTTPS and verify certificates when contacting registries. */
|
|
240
|
-
tlsVerify?: boolean;
|
|
241
|
-
};
|
|
242
|
-
type PodmanRunOptions = {
|
|
243
|
-
/** Image to run. */
|
|
244
|
-
image: string;
|
|
245
|
-
/** Command to run in the container. */
|
|
246
|
-
command?: string | string[];
|
|
247
|
-
/** Additional arguments to pass to the command. */
|
|
248
|
-
commandArgs?: string[];
|
|
249
|
-
/** Add a custom host-to-IP mapping (host:ip). */
|
|
250
|
-
addHost?: string | string[];
|
|
251
|
-
/** Add annotations to container (key=value). */
|
|
252
|
-
annotation?: string | string[];
|
|
253
|
-
/** Use ARCH instead of the architecture of the machine for choosing images. */
|
|
254
|
-
arch?: string;
|
|
255
|
-
/** Attach to STDIN, STDOUT or STDERR. */
|
|
256
|
-
attach?: string | string[];
|
|
257
|
-
/** Path of the authentication file. */
|
|
258
|
-
authfile?: string;
|
|
259
|
-
/** Block IO weight (relative weight) accepts a weight value between 10 and 1000. */
|
|
260
|
-
blkioWeight?: string;
|
|
261
|
-
/** Block IO weight (relative device weight, format: DEVICE_NAME:WEIGHT). */
|
|
262
|
-
blkioWeightDevice?: string | string[];
|
|
263
|
-
/** Add capabilities to the container. */
|
|
264
|
-
capAdd?: string | string[];
|
|
265
|
-
/** Drop capabilities from the container. */
|
|
266
|
-
capDrop?: string | string[];
|
|
267
|
-
/** Configure cgroup v2 (key=value). */
|
|
268
|
-
cgroupConf?: string | string[];
|
|
269
|
-
/** Optional parent cgroup for the container. */
|
|
270
|
-
cgroupParent?: string;
|
|
271
|
-
/** Cgroup namespace to use. */
|
|
272
|
-
cgroupns?: string;
|
|
273
|
-
/** Control container cgroup configuration ("enabled"|"disabled"|"no-conmon"|"split"). */
|
|
274
|
-
cgroups?: string;
|
|
275
|
-
/** Chroot directories inside the container. */
|
|
276
|
-
chrootdirs?: string | string[];
|
|
277
|
-
/** Write the container ID to the file. */
|
|
278
|
-
cidfile?: string;
|
|
279
|
-
/** Limit the CPU CFS (Completely Fair Scheduler) period. */
|
|
280
|
-
cpuPeriod?: number;
|
|
281
|
-
/** Limit the CPU CFS (Completely Fair Scheduler) quota. */
|
|
282
|
-
cpuQuota?: number;
|
|
283
|
-
/** Limit the CPU real-time period in microseconds. */
|
|
284
|
-
cpuRtPeriod?: number;
|
|
285
|
-
/** Limit the CPU real-time runtime in microseconds. */
|
|
286
|
-
cpuRtRuntime?: number;
|
|
287
|
-
/** CPU shares (relative weight). */
|
|
288
|
-
cpuShares?: number;
|
|
289
|
-
/** Number of CPUs. The default is 0.000 which means no limit. */
|
|
290
|
-
cpus?: number;
|
|
291
|
-
/** CPUs in which to allow execution (0-3, 0,1). */
|
|
292
|
-
cpusetCpus?: string;
|
|
293
|
-
/** Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. */
|
|
294
|
-
cpusetMems?: string;
|
|
295
|
-
/** Run container in background and print container ID. */
|
|
296
|
-
detach?: boolean;
|
|
297
|
-
/** Override the key sequence for detaching a container. */
|
|
298
|
-
detachKeys?: string;
|
|
299
|
-
/** Add a host device to the container. */
|
|
300
|
-
device?: string | string[];
|
|
301
|
-
/** Add a rule to the cgroup allowed devices list. */
|
|
302
|
-
deviceCgroupRule?: string | string[];
|
|
303
|
-
/** Limit read rate (bytes per second) from a device. */
|
|
304
|
-
deviceReadBps?: string | string[];
|
|
305
|
-
/** Limit read rate (IO per second) from a device. */
|
|
306
|
-
deviceReadIops?: string | string[];
|
|
307
|
-
/** Limit write rate (bytes per second) to a device. */
|
|
308
|
-
deviceWriteBps?: string | string[];
|
|
309
|
-
/** Limit write rate (IO per second) to a device. */
|
|
310
|
-
deviceWriteIops?: string | string[];
|
|
311
|
-
/** This is a Docker specific option and is a NOOP. */
|
|
312
|
-
disableContentTrust?: boolean;
|
|
313
|
-
/** Set custom DNS servers. */
|
|
314
|
-
dns?: string | string[];
|
|
315
|
-
/** Set custom DNS options. */
|
|
316
|
-
dnsOption?: string | string[];
|
|
317
|
-
/** Set custom DNS search domains. */
|
|
318
|
-
dnsSearch?: string | string[];
|
|
319
|
-
/** Overwrite the default ENTRYPOINT of the image. */
|
|
320
|
-
entrypoint?: string;
|
|
321
|
-
/** Set environment variables in container. */
|
|
322
|
-
env?: string | string[];
|
|
323
|
-
/** Read in a file of environment variables. */
|
|
324
|
-
envFile?: string | string[];
|
|
325
|
-
/** Preprocess environment variables from image before injecting them into the container. */
|
|
326
|
-
envMerge?: string | string[];
|
|
327
|
-
/** Expose a port or a range of ports. */
|
|
328
|
-
expose?: string | string[];
|
|
329
|
-
/** GID map to use for the user namespace. */
|
|
330
|
-
gidmap?: string | string[];
|
|
331
|
-
/** GPU devices to add to the container ('all' to pass all GPUs). */
|
|
332
|
-
gpus?: string | string[];
|
|
333
|
-
/** Add additional groups to the primary container process. */
|
|
334
|
-
groupAdd?: string | string[];
|
|
335
|
-
/** Entry to write to /etc/group. */
|
|
336
|
-
groupEntry?: string;
|
|
337
|
-
/** Set a healthcheck command for the container ('none' disables the existing healthcheck). */
|
|
338
|
-
healthCmd?: string;
|
|
339
|
-
/** Set an interval for the healthcheck. */
|
|
340
|
-
healthInterval?: string;
|
|
341
|
-
/** Set the destination of the HealthCheck log. */
|
|
342
|
-
healthLogDestination?: string;
|
|
343
|
-
/** Set maximum number of attempts in the HealthCheck log file. */
|
|
344
|
-
healthMaxLogCount?: number;
|
|
345
|
-
/** Set maximum length in characters of stored HealthCheck log. */
|
|
346
|
-
healthMaxLogSize?: number;
|
|
347
|
-
/** Action to take once the container turns unhealthy. */
|
|
348
|
-
healthOnFailure?: string;
|
|
349
|
-
/** The number of retries allowed before a healthcheck is considered to be unhealthy. */
|
|
350
|
-
healthRetries?: number;
|
|
351
|
-
/** The initialization time needed for a container to bootstrap. */
|
|
352
|
-
healthStartPeriod?: string;
|
|
353
|
-
/** Set a startup healthcheck command for the container. */
|
|
354
|
-
healthStartupCmd?: string;
|
|
355
|
-
/** Set an interval for the startup healthcheck. */
|
|
356
|
-
healthStartupInterval?: string;
|
|
357
|
-
/** Set the maximum number of retries before the startup healthcheck will restart the container. */
|
|
358
|
-
healthStartupRetries?: number;
|
|
359
|
-
/** Set the number of consecutive successes before the startup healthcheck is marked as successful. */
|
|
360
|
-
healthStartupSuccess?: number;
|
|
361
|
-
/** Set the maximum amount of time that the startup healthcheck may take before it is considered failed. */
|
|
362
|
-
healthStartupTimeout?: string;
|
|
363
|
-
/** The maximum time allowed to complete the healthcheck before an interval is considered failed. */
|
|
364
|
-
healthTimeout?: string;
|
|
365
|
-
/** Set container hostname. */
|
|
366
|
-
hostname?: string;
|
|
367
|
-
/** Base file to create the /etc/hosts file inside the container, or one of the special values. */
|
|
368
|
-
hostsFile?: string;
|
|
369
|
-
/** Host user account to add to /etc/passwd within container. */
|
|
370
|
-
hostuser?: string | string[];
|
|
371
|
-
/** Set proxy environment variables in the container based on the host proxy vars. */
|
|
372
|
-
httpProxy?: boolean;
|
|
373
|
-
/** Tells podman how to handle the builtin image volumes ("bind"|"tmpfs"|"ignore"). */
|
|
374
|
-
imageVolume?: string;
|
|
375
|
-
/** Run an init binary inside the container that forwards signals and reaps processes. */
|
|
376
|
-
init?: boolean;
|
|
377
|
-
/** Path to the container-init binary. */
|
|
378
|
-
initPath?: string;
|
|
379
|
-
/** Make STDIN available to the contained process. */
|
|
380
|
-
interactive?: boolean;
|
|
381
|
-
/** Specify a static IPv4 address for the container. */
|
|
382
|
-
ip?: string;
|
|
383
|
-
/** Specify a static IPv6 address for the container. */
|
|
384
|
-
ip6?: string;
|
|
385
|
-
/** IPC namespace to use. */
|
|
386
|
-
ipc?: string;
|
|
387
|
-
/** Set metadata on container. */
|
|
388
|
-
label?: string | string[];
|
|
389
|
-
/** Read in a line delimited file of labels. */
|
|
390
|
-
labelFile?: string | string[];
|
|
391
|
-
/** Logging driver for the container. */
|
|
392
|
-
logDriver?: string;
|
|
393
|
-
/** Logging driver options. */
|
|
394
|
-
logOpt?: string | string[];
|
|
395
|
-
/** Container MAC address. */
|
|
396
|
-
macAddress?: string;
|
|
397
|
-
/** Memory limit (format: <number><unit>). */
|
|
398
|
-
memory?: string;
|
|
399
|
-
/** Memory soft limit (format: <number><unit>). */
|
|
400
|
-
memoryReservation?: string;
|
|
401
|
-
/** Swap limit equal to memory plus swap: '-1' to enable unlimited swap. */
|
|
402
|
-
memorySwap?: string;
|
|
403
|
-
/** Tune container memory swappiness (0 to 100, or -1 for system default). */
|
|
404
|
-
memorySwappiness?: number;
|
|
405
|
-
/** Attach a filesystem mount to the container. */
|
|
406
|
-
mount?: string | string[];
|
|
407
|
-
/** Assign a name to the container. */
|
|
408
|
-
name?: string;
|
|
409
|
-
/** Connect a container to a network. */
|
|
410
|
-
network?: string | string[];
|
|
411
|
-
/** Add network-scoped alias for the container. */
|
|
412
|
-
networkAlias?: string | string[];
|
|
413
|
-
/** Disable healthchecks on container. */
|
|
414
|
-
noHealthcheck?: boolean;
|
|
415
|
-
/** Do not create /etc/hostname within the container, instead use the version from the image. */
|
|
416
|
-
noHostname?: boolean;
|
|
417
|
-
/** Do not create /etc/hosts within the container, instead use the version from the image. */
|
|
418
|
-
noHosts?: boolean;
|
|
419
|
-
/** Disable OOM Killer. */
|
|
420
|
-
oomKillDisable?: boolean;
|
|
421
|
-
/** Tune the host's OOM preferences (-1000 to 1000). */
|
|
422
|
-
oomScoreAdj?: number;
|
|
423
|
-
/** Use OS instead of the running OS for choosing images. */
|
|
424
|
-
os?: string;
|
|
425
|
-
/** Add entries to /etc/passwd and /etc/group. */
|
|
426
|
-
passwd?: boolean;
|
|
427
|
-
/** Entry to write to /etc/passwd. */
|
|
428
|
-
passwdEntry?: string;
|
|
429
|
-
/** Configure execution domain using personality (e.g., LINUX/LINUX32). */
|
|
430
|
-
personality?: string;
|
|
431
|
-
/** PID namespace to use. */
|
|
432
|
-
pid?: string;
|
|
433
|
-
/** Tune container pids limit (set -1 for unlimited). */
|
|
434
|
-
pidsLimit?: number;
|
|
435
|
-
/** Specify the platform for selecting the image. */
|
|
436
|
-
platform?: string;
|
|
437
|
-
/** Run container in an existing pod. */
|
|
438
|
-
pod?: string;
|
|
439
|
-
/** Read the pod ID from the file. */
|
|
440
|
-
podIdFile?: string;
|
|
441
|
-
/** Give extended privileges to container. */
|
|
442
|
-
privileged?: boolean;
|
|
443
|
-
/** Publish a container's port, or a range of ports, to the host. */
|
|
444
|
-
publish?: string | string[];
|
|
445
|
-
/** Publish all exposed ports to random ports on the host interface. */
|
|
446
|
-
publishAll?: boolean;
|
|
447
|
-
/** Pull image policy ("always"|"missing"|"never"|"newer"). */
|
|
448
|
-
pull?: string;
|
|
449
|
-
/** Suppress output information when pulling images. */
|
|
450
|
-
quiet?: boolean;
|
|
451
|
-
/** Class of Service (COS) that the container should be assigned to. */
|
|
452
|
-
rdtClass?: string;
|
|
453
|
-
/** Make containers root filesystem read-only. */
|
|
454
|
-
readOnly?: boolean;
|
|
455
|
-
/** When running --read-only containers mount read-write tmpfs on /dev, /dev/shm, /run, /tmp and /var/tmp. */
|
|
456
|
-
readOnlyTmpfs?: boolean;
|
|
457
|
-
/** If a container with the same name exists, replace it. */
|
|
458
|
-
replace?: boolean;
|
|
459
|
-
/** Add one or more requirement containers that must be started before this container will start. */
|
|
460
|
-
requires?: string | string[];
|
|
461
|
-
/** Restart policy to apply when a container exits. */
|
|
462
|
-
restart?: string;
|
|
463
|
-
/** Number of times to retry in case of failure when performing pull. */
|
|
464
|
-
retry?: number;
|
|
465
|
-
/** Delay between retries in case of pull failures. */
|
|
466
|
-
retryDelay?: string;
|
|
467
|
-
/** Remove container and any anonymous unnamed volume associated with the container after exit. */
|
|
468
|
-
rm?: boolean;
|
|
469
|
-
/** Remove image unless used by other containers, implies --rm. */
|
|
470
|
-
rmi?: boolean;
|
|
471
|
-
/** The first argument is not an image but the rootfs to the exploded container. */
|
|
472
|
-
rootfs?: boolean;
|
|
473
|
-
/** Control sd-notify behavior ("container"|"conmon"|"healthy"|"ignore"). */
|
|
474
|
-
sdnotify?: string;
|
|
475
|
-
/** Policy for selecting a seccomp profile (experimental). */
|
|
476
|
-
seccompPolicy?: string;
|
|
477
|
-
/** Add secret to container. */
|
|
478
|
-
secret?: string | string[];
|
|
479
|
-
/** Security Options. */
|
|
480
|
-
securityOpt?: string | string[];
|
|
481
|
-
/** Size of /dev/shm (format: <number><unit>). */
|
|
482
|
-
shmSize?: string;
|
|
483
|
-
/** Size of systemd specific tmpfs mounts (/run, /run/lock). */
|
|
484
|
-
shmSizeSystemd?: string;
|
|
485
|
-
/** Proxy received signals to the process. */
|
|
486
|
-
sigProxy?: boolean;
|
|
487
|
-
/** Signal to stop a container. Default is SIGTERM. */
|
|
488
|
-
stopSignal?: string;
|
|
489
|
-
/** Timeout (in seconds) that containers stopped by user command have to exit. */
|
|
490
|
-
stopTimeout?: number;
|
|
491
|
-
/** Name of range listed in /etc/subgid for use in user namespace. */
|
|
492
|
-
subgidname?: string;
|
|
493
|
-
/** Name of range listed in /etc/subuid for use in user namespace. */
|
|
494
|
-
subuidname?: string;
|
|
495
|
-
/** Sysctl options. */
|
|
496
|
-
sysctl?: string | string[];
|
|
497
|
-
/** Run container in systemd mode ("true"|"false"|"always"). */
|
|
498
|
-
systemd?: string;
|
|
499
|
-
/** Maximum length of time a container is allowed to run. */
|
|
500
|
-
timeout?: number;
|
|
501
|
-
/** Require HTTPS and verify certificates when contacting registries for pulling images. */
|
|
502
|
-
tlsVerify?: boolean;
|
|
503
|
-
/** Mount a temporary filesystem (tmpfs) into a container. */
|
|
504
|
-
tmpfs?: string;
|
|
505
|
-
/** Allocate a pseudo-TTY for container. */
|
|
506
|
-
tty?: boolean;
|
|
507
|
-
/** Set timezone in container. */
|
|
508
|
-
tz?: string;
|
|
509
|
-
/** UID map to use for the user namespace. */
|
|
510
|
-
uidmap?: string | string[];
|
|
511
|
-
/** Ulimit options. */
|
|
512
|
-
ulimit?: string | string[];
|
|
513
|
-
/** Set umask in container. */
|
|
514
|
-
umask?: string;
|
|
515
|
-
/** Unset environment default variables in container. */
|
|
516
|
-
unsetenv?: string | string[];
|
|
517
|
-
/** Unset all default environment variables in container. */
|
|
518
|
-
unsetenvAll?: boolean;
|
|
519
|
-
/** Username or UID (format: <name|uid>[:<group|gid>]). */
|
|
520
|
-
user?: string;
|
|
521
|
-
/** User namespace to use. */
|
|
522
|
-
userns?: string;
|
|
523
|
-
/** UTS namespace to use. */
|
|
524
|
-
uts?: string;
|
|
525
|
-
/** Use VARIANT instead of the running architecture variant for choosing images. */
|
|
526
|
-
variant?: string;
|
|
527
|
-
/** Bind mount a volume into the container. */
|
|
528
|
-
volume?: string | string[];
|
|
529
|
-
/** Mount volumes from the specified container(s). */
|
|
530
|
-
volumesFrom?: string | string[];
|
|
531
|
-
/** Working directory inside the container. */
|
|
532
|
-
workdir?: string;
|
|
533
|
-
};
|
|
534
|
-
/**
|
|
535
|
-
* Output handling strategy for spawned processes.
|
|
536
|
-
*
|
|
537
|
-
* @example
|
|
538
|
-
* ```ts
|
|
539
|
-
* import {ProcessOutput} from 'podman'
|
|
540
|
-
*
|
|
541
|
-
* const mode = ProcessOutput.Tee
|
|
542
|
-
* ```
|
|
543
|
-
*/
|
|
544
|
-
export declare enum ProcessOutput {
|
|
545
|
-
/** Capture output in a stream. */
|
|
546
|
-
Pipe = "pipe",
|
|
547
|
-
/** Discard output. */
|
|
548
|
-
Ignore = "ignore",
|
|
549
|
-
/** Forward output to the parent process. */
|
|
550
|
-
Inherit = "inherit",
|
|
551
|
-
/** Capture output and also forward it to the parent process. */
|
|
552
|
-
Tee = "tee"
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Process output configuration for podman run.
|
|
556
|
-
*
|
|
557
|
-
* @example
|
|
558
|
-
* ```ts
|
|
559
|
-
* import {ProcessOutput} from 'podman'
|
|
560
|
-
*
|
|
561
|
-
* const options = {stdout: ProcessOutput.Tee, stderr: ProcessOutput.Pipe}
|
|
562
|
-
* ```
|
|
563
|
-
*/
|
|
564
|
-
export type ProcessOptions = {
|
|
565
|
-
/** How stdout is handled. Defaults to [`ProcessOutput.Inherit`]{@link ProcessOutput.Inherit}. */
|
|
566
|
-
stdout?: ProcessOutput;
|
|
567
|
-
/** How stderr is handled. Defaults to [`ProcessOutput.Inherit`]{@link ProcessOutput.Inherit}. */
|
|
568
|
-
stderr?: ProcessOutput;
|
|
569
|
-
};
|
|
570
|
-
/**
|
|
571
|
-
* Handle returned by [`run`]{@link run} to control the podman process.
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* ```ts
|
|
575
|
-
* import {run, ProcessOutput} from 'podman'
|
|
576
|
-
*
|
|
577
|
-
* const proc = run(
|
|
578
|
-
* {image: 'alpine:latest', command: 'echo', commandArgs: ['hello']},
|
|
579
|
-
* {stdout: ProcessOutput.Tee},
|
|
580
|
-
* )
|
|
581
|
-
* await proc.waitThrow()
|
|
582
|
-
* ```
|
|
583
|
-
*/
|
|
584
|
-
export type PodmanRunHandle = {
|
|
585
|
-
/**
|
|
586
|
-
* Sends SIGKILL to the podman process.
|
|
587
|
-
*
|
|
588
|
-
* @returns True if the signal was sent, false otherwise.
|
|
589
|
-
*
|
|
590
|
-
* @example
|
|
591
|
-
* ```ts
|
|
592
|
-
* import {run} from 'podman'
|
|
593
|
-
*
|
|
594
|
-
* const proc = await run({image: 'alpine:latest', command: 'sleep', commandArgs: ['60']})
|
|
595
|
-
* proc.kill()
|
|
596
|
-
* ```
|
|
597
|
-
*/
|
|
598
|
-
kill: () => boolean;
|
|
599
|
-
/**
|
|
600
|
-
* Sends SIGTERM to the podman process.
|
|
601
|
-
*
|
|
602
|
-
* @returns True if the signal was sent, false otherwise.
|
|
603
|
-
*
|
|
604
|
-
* @example
|
|
605
|
-
* ```ts
|
|
606
|
-
* import {run} from 'podman'
|
|
607
|
-
*
|
|
608
|
-
* const proc = await run({image: 'alpine:latest', command: 'sleep', commandArgs: ['60']})
|
|
609
|
-
* proc.term()
|
|
610
|
-
* ```
|
|
611
|
-
*/
|
|
612
|
-
term: () => boolean;
|
|
613
|
-
/**
|
|
614
|
-
* Waits for the podman process to exit.
|
|
615
|
-
*
|
|
616
|
-
* @returns Resolves with the exit code of the podman process.
|
|
617
|
-
*
|
|
618
|
-
* @example
|
|
619
|
-
* ```ts
|
|
620
|
-
* import {run} from 'podman'
|
|
621
|
-
*
|
|
622
|
-
* const proc = await run({image: 'alpine:latest', command: 'true'})
|
|
623
|
-
* const code = await proc.wait()
|
|
624
|
-
* console.log(code)
|
|
625
|
-
* ```
|
|
626
|
-
*/
|
|
627
|
-
wait: () => Promise<number>;
|
|
628
|
-
/**
|
|
629
|
-
* Waits for the podman process to exit and rejects on non-zero exit codes.
|
|
630
|
-
*
|
|
631
|
-
* @returns Resolves with the exit code when it is zero.
|
|
632
|
-
*
|
|
633
|
-
* @example
|
|
634
|
-
* ```ts
|
|
635
|
-
* import {run} from 'podman'
|
|
636
|
-
*
|
|
637
|
-
* const proc = await run({image: 'alpine:latest', command: 'false'})
|
|
638
|
-
* await proc.waitThrow()
|
|
639
|
-
* ```
|
|
640
|
-
*/
|
|
641
|
-
waitThrow: () => Promise<number>;
|
|
642
|
-
/** Stdout stream when configured with [`ProcessOutput.Pipe`]{@link ProcessOutput.Pipe} or [`ProcessOutput.Tee`]{@link ProcessOutput.Tee}. */
|
|
643
|
-
stdout: Readable | null;
|
|
644
|
-
/** Stderr stream when configured with [`ProcessOutput.Pipe`]{@link ProcessOutput.Pipe} or [`ProcessOutput.Tee`]{@link ProcessOutput.Tee}. */
|
|
645
|
-
stderr: Readable | null;
|
|
646
|
-
};
|
|
647
|
-
/**
|
|
648
|
-
* Ensures the Podman machine is running.
|
|
649
|
-
*
|
|
650
|
-
* @param machineName Name of the Podman machine to start.
|
|
651
|
-
* @returns Resolves to true when a machine start was triggered, or false if it is already running.
|
|
652
|
-
*
|
|
653
|
-
* @example
|
|
654
|
-
* ```ts
|
|
655
|
-
* import {startMachine} from 'podman'
|
|
656
|
-
*
|
|
657
|
-
* const started = await startMachine()
|
|
658
|
-
* if (started) {
|
|
659
|
-
* console.log('Podman machine booted.')
|
|
660
|
-
* }
|
|
661
|
-
* ```
|
|
662
|
-
*/
|
|
663
|
-
export declare function startMachine(machineName?: string): Promise<boolean>;
|
|
664
|
-
/**
|
|
665
|
-
* Builds a container image using podman build.
|
|
666
|
-
*
|
|
667
|
-
* Use [`startMachine`]{@link startMachine} first when running against a Podman VM.
|
|
668
|
-
*
|
|
669
|
-
* @param options Build options for podman build.
|
|
670
|
-
* @returns Resolves with the built image ID (sha256 hash).
|
|
671
|
-
*
|
|
672
|
-
* @example
|
|
673
|
-
* ```ts
|
|
674
|
-
* import {build} from 'podman'
|
|
675
|
-
*
|
|
676
|
-
* const imageId = await build({context: '.', tag: 'my-app:latest'})
|
|
677
|
-
* console.log(imageId)
|
|
678
|
-
* ```
|
|
679
|
-
*
|
|
680
|
-
* @example
|
|
681
|
-
* ```ts
|
|
682
|
-
* import {startMachine, build} from 'podman'
|
|
683
|
-
*
|
|
684
|
-
* await startMachine()
|
|
685
|
-
* const imageId = await build({file: './Containerfile', tag: 'my-app:dev'})
|
|
686
|
-
* console.log(imageId)
|
|
687
|
-
* ```
|
|
688
|
-
*/
|
|
689
|
-
export declare function build(options?: PodmanBuildOptions): Promise<string>;
|
|
690
|
-
/**
|
|
691
|
-
* Pushes a container image to a specified destination.
|
|
692
|
-
*
|
|
693
|
-
* @param options Push options for podman push.
|
|
694
|
-
* @returns Resolves when the push succeeds.
|
|
695
|
-
*
|
|
696
|
-
* @example
|
|
697
|
-
* ```ts
|
|
698
|
-
* import {push} from 'podman'
|
|
699
|
-
*
|
|
700
|
-
* await push({image: 'my-app:latest', destination: 'docker://registry.example.com/my-app:latest'})
|
|
701
|
-
* ```
|
|
702
|
-
*/
|
|
703
|
-
export declare function push(options: PodmanPushOptions): Promise<void>;
|
|
704
|
-
/**
|
|
705
|
-
* Runs a command in a new container.
|
|
706
|
-
*
|
|
707
|
-
* @param options Run options for podman run.
|
|
708
|
-
* @param processOptions Output handling for the spawned podman process.
|
|
709
|
-
* @returns Handle for controlling the running podman process.
|
|
710
|
-
*
|
|
711
|
-
* @example
|
|
712
|
-
* ```ts
|
|
713
|
-
* import {run} from 'podman'
|
|
714
|
-
*
|
|
715
|
-
* const proc = run({image: 'alpine:latest', command: 'echo', commandArgs: ['hello from podman']})
|
|
716
|
-
* await proc.waitThrow()
|
|
717
|
-
* ```
|
|
718
|
-
*
|
|
719
|
-
* @example
|
|
720
|
-
* ```ts
|
|
721
|
-
* import {run, ProcessOutput} from 'podman'
|
|
722
|
-
*
|
|
723
|
-
* const proc = run(
|
|
724
|
-
* {image: 'alpine:latest', command: 'sh', commandArgs: ['-c', 'echo hello; echo err 1>&2']},
|
|
725
|
-
* {stdout: ProcessOutput.Tee, stderr: ProcessOutput.Pipe},
|
|
726
|
-
* )
|
|
727
|
-
* const code = await proc.wait()
|
|
728
|
-
* console.log(code, proc.stderr)
|
|
729
|
-
* ```
|
|
730
|
-
*/
|
|
731
|
-
export declare function run(options: PodmanRunOptions, processOptions?: ProcessOptions): PodmanRunHandle;
|
|
732
|
-
export {};
|
|
1
|
+
export { run } from './commands/run';
|
|
2
|
+
export { build } from './commands/build';
|
|
3
|
+
export { push } from './commands/push';
|
|
4
|
+
export { tag } from './commands/tag';
|
|
5
|
+
export { forceStartMachine, isMachineRunning, listMachines, startMachine } from './commands/start-machine.ts';
|