From e88b625decb6da51a4642d91326ba967f6d140cd Mon Sep 17 00:00:00 2001 From: edgar poce Date: Tue, 24 Mar 2020 17:48:25 -0300 Subject: [PATCH] added documentation --- docker/resource_docker_registry_image.go | 4 -- website/docs/r/registry_image.html.markdown | 52 ++++++++++++++++++++- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/docker/resource_docker_registry_image.go b/docker/resource_docker_registry_image.go index 678dba87..0d23d159 100644 --- a/docker/resource_docker_registry_image.go +++ b/docker/resource_docker_registry_image.go @@ -268,10 +268,6 @@ func resourceDockerRegistryImage() *schema.Resource { Optional: true, ForceNew: true, }, - // "output": &schema.Schema{ - // Type: schema.TypeString, - // Optional: true, - // }, }, }, }, diff --git a/website/docs/r/registry_image.html.markdown b/website/docs/r/registry_image.html.markdown index 0fc5b618..924c1bf0 100644 --- a/website/docs/r/registry_image.html.markdown +++ b/website/docs/r/registry_image.html.markdown @@ -32,12 +32,62 @@ resource "docker_registry_image" "helloworld" { deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. -* `build` - (Optional, Customize docker build arguments) See [Build](#build-1) below for details. +* `build` - (Optional, Map) See [Build](#build-1) below for details. #### Build Block +* `context` (Required, string) - The path to the context folder +* `suppress_output` (Optional, bool) - Suppress the build output and print image ID on success +* `remote_context` (Optional, string) - A Git repository URI or HTTP/HTTPS context URI +* `no_cache` (Optional, bool) - Do not use the cache when building the image +* `remove` (Optional, bool) - Remove intermediate containers after a successful build (default behavior) +* `force_remove` (Optional, bool) - Always remove intermediate containers +* `pull_parent` (Optional, bool) - Attempt to pull the image even if an older image exists locally +* `isolation` (Optional, string) - Isolation represents the isolation technology of a container. The supported values are platform specific +* `cpu_set_cpus` (Optional, string) - CPUs in which to allow execution (e.g., 0-3, 0,1) +* `cpu_set_mems` (Optional, string) - MEMs in which to allow execution (0-3, 0,1) +* `cpu_shares` (Optional, int) - CPU shares (relative weight) +* `cpu_quota` (Optional, int) - Microseconds of CPU time that the container can get in a CPU period +* `cpu_period` (Optional, int) - The length of a CPU period in microseconds +* `memory` (Optional, int) - Set memory limit for build +* `memory_swap` (Optional, int) - Total memory (memory + swap), -1 to enable unlimited swap +* `cgroup_parent` (Optional, string) - Optional parent cgroup for the container +* `network_mode` (Optional, string) - Set the networking mode for the RUN instructions during build +* `shm_size` (Optional, int) - Size of /dev/shm in bytes. The size must be greater than 0 +* `` (Optional, string) - Set the networking mode for the RUN instructions during build +* `dockerfile` (Optional, string) - Dockerfile file. Default is "Dockerfile" +* `ulimit` (Optional, Map) - See [Ulimit](#ulimit-1) below for details +* `build_args` (Optional, map of key/value pairs) string pairs for build-time variables +* `auth_config` (Optional, Map) - See [AuthConfig](#authconfig-1) below for details +* `labels` (Optional, map of key/value pairs) string pairs for labels +* `squash` (Optional, bool) - squash the new layers into a new image with a single new layer +* `cache_from` (Optional, []string) - Images to consider as cache sources +* `security_opt` (Optional, []string) - Security options +* `extra_hosts` (Optional, []string) - A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"] +* `target` (Optional, string) - Set the target build stage to build +* `platform` (Optional, string) - Set platform if server is multi-platform capable +* `version` (Optional, string) - Version of the unerlying builder to use +* `build_id` (Optional, string) - BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request + +#### Ulimit Block + +* `name` - (Required, string) type of ulimit, e.g. nofile +* `soft` (Required, int) - soft limit +* `hard` (Required, int) - hard limit + + +#### AuthConfig Block + +* `host_name` - (Required, string) hostname of the registry +* `user_name` - (Optional, string) the registry user name +* `password` - (Optional, string) the registry password +* `auth` - (Optional, string) the auth token +* `email` - (Optional, string) the user emal +* `server_address` - (Optional, string) the server address +* `identity_token` - (Optional, string) the identity token +* `registry_token` - (Optional, string) the registry token ## Attributes Reference