Context
rdocker required a 'context' to be set up before it can be used.
It should not be confused with the Docker context, but rather a context for rdocker itself.
A Docker context (with the same context name) is automatically managed by rdocker for you.
The rdocker context is a set of parameters that define the connection to the remote Docker daemon.
Each context refers to a remote Docker daemon and is identified by a unique name.
The parameters are stored in a dotenv file in the ~/.rdocker directory.
Example context file:
Using rdocker with context
With the context file in place, you can now use rdocker to connect to the remote Docker daemon.
Just set the RDOCKER_CONTEXT environment variable to the name of the context you want to use.
For example, to start a tunnel to the remote Docker daemon defined in the remote0 context,
run the following command:
this can also be written as a one-liner:
| Bash | |
|---|---|