Volume

class Volume : KotlinCustomResource

Creates and destroys a volume in Docker. This can be used alongside docker.Container to prepare volumes that can be shared across containers.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.Volume;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var sharedVolume = new Volume("sharedVolume");
}
}

Import

Example Assuming you created a volume as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {

name = "524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d" } then the import command is as follows #!/bin/bash

$ pulumi import docker:index/volume:Volume foo 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d

Properties

Link copied to clipboard
val driver: Output<String>

Driver type for the volume. Defaults to local.

Link copied to clipboard
val driverOpts: Output<Map<String, Any>>?

Options specific to the driver.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<List<VolumeLabel>>?

User-defined key/value metadata

Link copied to clipboard
val mountpoint: Output<String>

The mountpoint of the volume.

Link copied to clipboard
val name: Output<String>

The name of the Docker volume (will be generated if not provided).

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>