Docker remote is a CLI to manage everything about docker in a remote machine.
All installation scripts are based on nvm
installation scripts (https://github.com/nvm-sh/nvm).
To install or update docker-remote, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
curl -o- https://raw.githubusercontent.com/williamegomezo/docker-remote/v1.0.0/install.sh | bash
wget -qO- https://raw.githubusercontent.com/williamegomezo/docker-remote/v1.0.0/install.sh | bash
Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.docker-remote
, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile
, ~/.zshrc
, ~/.profile
, or ~/.bashrc
).
export DOCKER_REMOTE_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.docker-remote" || printf %s "${XDG_CONFIG_HOME}/docker-remote")"
[ -s "$DOCKER_REMOTE_DIR/docker-remote.sh" ] && \. "$DOCKER_REMOTE_DIR/docker-remote.sh" # This loads docker-remote
List all commands and instructions.
docker-remote --help
Install and configures a remote machine with docker. Prerequisites:
- Remote machine user in SSH_CONNECTION must be a sudoer.
docker-remote setup-remote SSH_CONNECTION
SSH_CONNECTION examples:
docker-remote setup-remote host_saved_in_ssh_config
docker-remote setup-remote user@host
Push a local image to a remote machine.
docker-remote push SSH_CONNECTION NAME[:TAG]
Runs docker in remote machine, after SSH_CONNECTION this command works as docker run in a local machine.
docker-remote run SSH_CONNECTION [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]