diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 229246a5..eb50c44c 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -35,6 +35,16 @@ resource "docker_image" "ubuntu" { } ``` +-> **Note** +You can also use the `ssh` protocol to connect to the docker host on a remote machine. +The configuration would look as follows: + +```hcl +provider "docker" { + host = "ssh://user@remote-host:22" +} +``` + ## Registry Credentials Registry credentials can be provided on a per-registry basis with the `registry_auth` @@ -49,7 +59,7 @@ provider "docker" { registry_auth { address = "registry.hub.docker.com" - config_file = "~/.docker/config.json" + config_file = "${pathexpand("~/.docker/config.json")}" } registry_auth { @@ -69,25 +79,25 @@ data "docker_registry_image" "quay" { ``` -> **Note** -When passing in a config file make sure every repo in the `auths` object should have -a corresponding `auth` string. +When passing in a config file either the corresponding `auth` string of the repository is read or the os specific +credential helpers (see [here](https://github.com/docker/docker-credential-helpers#available-programs)) are +used to retrieve the authentication credentials. -In this case, either use `username` and `password` directly or set the enviroment variables `DOCKER_REGISTRY_USER` and `DOCKER_REGISTRY_PASS` or add the string manually via +You can still use the enviroment variables `DOCKER_REGISTRY_USER` and `DOCKER_REGISTRY_PASS`. -```sh -echo -n "user:pass" | base64 -# dXNlcjpwYXNz= -``` - -and paste it into `~/.docker/config.json`: +An example content of the file `~/.docker/config.json` on OSX may look like follows: ```json { "auths": { "repo.mycompany:8181": { "auth": "dXNlcjpwYXNz=" + }, + "otherrepo.other-company:8181": { + } - } + }, + "credsStore" : "osxkeychain" } ``` diff --git a/website/docs/r/container.html.markdown b/website/docs/r/container.html.markdown index c30207b6..91d81b3d 100644 --- a/website/docs/r/container.html.markdown +++ b/website/docs/r/container.html.markdown @@ -144,9 +144,7 @@ supports the following: * `volume_options` - (Optional, map) Optional configuration for the `volume` type. * `no_copy` - (Optional, string) Whether to populate volume with data from the target. * `labels` - (Optional, map of key/value pairs) Adding labels. - * `driver_config` - (Optional, map) The name of the driver to create the volume. - * `name` - (Optional, string) The name of the driver to create the volume. - * `options` - (Optional, map of key/value pairs) Options for the driver. + * `driver_options` - (Optional, map of key/value pairs) Options for the driver. * `tmpfs_options` - (Optional, map) Optional configuration for the `tmpf` type. * `size_bytes` - (Optional, int) The size for the tmpfs mount in bytes. * `mode` - (Optional, int) The permission mode for the tmpfs mount in an integer.