---
title: EnsureImageOptions
description: Everything ensureImage needs besides the size class.
---

Everything `ensureImage` needs besides the size class.

`baseImage` defaults to `baseImageFromDockerfile(dockerfile)`; `waitTimeoutSeconds` is
the build wait, 45 minutes by default. `contextDir` is read as `docker build` reads a
context: `Dockerfile.dockerignore`, else `.dockerignore`, is honoured, and symlinks are
skipped with a line in the result's `warnings`.

## Properties

### baseImage?

```ts
optional baseImage?: BaseImageInput;
```

***

### baseImageVersion?

```ts
optional baseImageVersion?: string;
```

`buildImage`'s `baseImageVersion`; it joins the name's hash.

***

### binary

```ts
binary: Uint8Array;
```

The daemon binary's bytes.

***

### buildRoleArn

```ts
buildRoleArn: string;
```

The build role.

***

### contextDir?

```ts
optional contextDir?: string;
```

The directory the Dockerfile's `COPY` lines read, or omitted for none.

***

### dockerfile

```ts
dockerfile: string;
```

The Dockerfile, usually `wrapDockerfile(task)`.

***

### force?

```ts
optional force?: boolean;
```

Delete what exists under the name and build afresh.

***

### namePrefix

```ts
namePrefix: string;
```

The image name's stem; the name is `<namePrefix>-<hash12>`.

***

### projectDir?

```ts
optional projectDir?: string;
```

`buildImage`'s `projectDir`; the pair joins the name's hash.

***

### repairGuestIdentity?

```ts
optional repairGuestIdentity?: boolean;
```

Repair guest identity during image creation. Part of the content-addressed name.

***

### s3Bucket

```ts
s3Bucket: string;
```

The artifact bucket, in the sandbox's region.

***

### s3KeyPrefix?

```ts
optional s3KeyPrefix?: string;
```

A key prefix inside the bucket, or omitted for the bucket root.

***

### tags?

```ts
optional tags?: Record<string, string>;
```

***

### waitTimeoutSeconds?

```ts
optional waitTimeoutSeconds?: number;
```

## Provenance

This page is generated from `bindings/microvms-js/index.d.ts` by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run dts`. `mise run dts:check` fails when the committed file no longer matches the source.