### Verify Docker Pussh Installation Source: https://github.com/psviderski/unregistry/blob/main/README.md This command verifies the successful installation of the `docker-pussh` plugin by invoking its help message. A successful output indicates that the plugin is correctly installed and accessible via the Docker CLI. ```shell docker pussh --help ``` -------------------------------- ### Install docker-pussh CLI Plugin via Direct Download Source: https://github.com/psviderski/unregistry/blob/main/README.md Instructions for manually installing the `docker-pussh` CLI plugin by directly downloading the script. This method involves creating the necessary plugin directory and using `curl` to fetch the script. ```shell mkdir -p ~/.docker/cli-plugins # Download the script to the docker plugins directory curl -sSL https://raw.githubusercontent.com/psviderski/unregistry/v0.1.3/docker-pussh \ -o ~/.docker/cli-plugins/docker-pussh ``` -------------------------------- ### Install docker-pussh CLI Plugin via Homebrew Source: https://github.com/psviderski/unregistry/blob/main/README.md Instructions for installing the `docker-pussh` CLI plugin on macOS/Linux using Homebrew. This includes adding the tap, installing the package, and creating a symlink to integrate it as a `docker pussh` command. ```shell brew install psviderski/tap/docker-pussh mkdir -p ~/.docker/cli-plugins ln -sf $(brew --prefix)/bin/docker-pussh ~/.docker/cli-plugins/docker-pussh ``` -------------------------------- ### Install Docker Pussh from GitHub Main Branch Source: https://github.com/psviderski/unregistry/blob/main/README.md This sequence of commands downloads the latest `docker-pussh` script from the main branch of the unregistry GitHub repository and saves it to the Docker CLI plugins directory. It then makes the downloaded script executable, preparing it for use. ```shell curl -sSL https://raw.githubusercontent.com/psviderski/unregistry/main/docker-pussh \ -o ~/.docker/cli-plugins/docker-pussh chmod +x ~/.docker/cli-plugins/docker-pussh ``` -------------------------------- ### Install Unregistry and Docker Pussh on Debian Source: https://github.com/psviderski/unregistry/blob/main/README.md These commands add the unofficial unregistry Debian repository to the system's APT sources. It first imports the GPG key for repository authentication, then adds the repository URL, and finally uses `apt` to install both `unregistry` and `docker-pussh` packages. ```sh curl -sS https://debian.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/debian.griffo.io.gpg echo "deb https://debian.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/debian.griffo.io.list apt install -y unregistry apt install docker-pussh ``` -------------------------------- ### Defining Custom SSH Host Configuration Source: https://github.com/psviderski/unregistry/blob/main/README.md This example shows how to configure a custom SSH host entry in the `~/.ssh/config` file. It specifies a hostname, user, port, and identity file, enabling simplified and secure connections to remote servers for deployment. ```shell Host prod-server HostName server.example.com User deploy Port 2222 IdentityFile ~/.ssh/deploy_key ``` -------------------------------- ### Build and Deploy Docker Image to Production Source: https://github.com/psviderski/unregistry/blob/main/README.md This sequence of commands demonstrates a direct deployment workflow. It first builds a Docker image for a specific platform, then pushes it directly to a production server using `docker-pussh`, and finally executes a command via SSH on the remote server to run the newly pushed image. ```shell docker build --platform linux/amd64 -t myapp:1.2.3 . docker pussh myapp:1.2.3 deploy@prod-server ssh deploy@prod-server docker run -d myapp:1.2.3 ``` -------------------------------- ### Tagging and Pushing Docker Images to a Local Registry Source: https://github.com/psviderski/unregistry/blob/main/README.md This snippet demonstrates the standard Docker commands to tag an image with a local registry address and then push it. It illustrates basic interaction with a Docker-compatible image registry, assuming 'localhost:5000' is the unregistry endpoint. ```shell docker tag myapp:latest localhost:5000/myapp:latest docker push localhost:5000/myapp:latest ``` -------------------------------- ### CI/CD Pipeline Integration with Docker Pussh Source: https://github.com/psviderski/unregistry/blob/main/README.md This YAML snippet illustrates how `docker-pussh` can be integrated into a CI/CD pipeline, such as GitHub Actions. It defines a step that builds a Docker image tagged with the Git SHA and then pushes it directly to a staging server, streamlining the deployment process by bypassing a traditional registry. ```yaml - name: Build and deploy run: | docker build -t myapp:${{ github.sha }} . docker pussh myapp:${{ github.sha }} deploy@staging-server ``` -------------------------------- ### Run Unregistry as a Standalone Local Registry Source: https://github.com/psviderski/unregistry/blob/main/README.md This command runs the `unregistry` container as a standalone local image registry. It maps port 5000, mounts the containerd socket for direct image storage, and names the container 'unregistry', providing a lightweight alternative to traditional registries. ```shell docker run -d -p 5000:5000 --name unregistry \ -v /run/containerd/containerd.sock:/run/containerd/containerd.sock \ ghcr.io/psviderski/unregistry ``` -------------------------------- ### Preload Unregistry Image for Restricted Environments Source: https://github.com/psviderski/unregistry/blob/main/README.md For air-gapped or restricted network environments, these commands allow preloading the `unregistry` image onto a remote server. This ensures `docker pussh` can function without requiring the remote server to pull from `ghcr.io`. ```shell # On a machine with internet access docker pull ghcr.io/psviderski/unregistry:latest docker save ghcr.io/psviderski/unregistry:latest | ssh user@server docker load ``` -------------------------------- ### Make Docker Pussh Executable Source: https://github.com/psviderski/unregistry/blob/main/README.md This command grants execute permissions to the `docker-pussh` CLI plugin script, making it runnable. It's a standard step after downloading the script to ensure it can be invoked by the system. ```shell chmod +x ~/.docker/cli-plugins/docker-pussh ``` -------------------------------- ### Push Docker Image to Remote Server with docker pussh Source: https://github.com/psviderski/unregistry/blob/main/README.md This command demonstrates the core functionality of `docker pussh`, allowing direct transfer of a Docker image to a specified remote server via SSH. It efficiently transfers only the layers that are missing on the remote host. ```shell docker pussh myapp:latest user@server ``` -------------------------------- ### Push Docker Image with SSH Key Authentication Source: https://github.com/psviderski/unregistry/blob/main/README.md This command demonstrates pushing a Docker image to a remote host using a specific SSH private key for authentication. The `-i` flag specifies the path to the identity file, which is useful when the key is not managed by the SSH agent. ```shell docker pussh myapp:latest ubuntu@192.168.1.100 -i ~/.ssh/id_rsa ``` -------------------------------- ### Push Multi-Platform Docker Image Source: https://github.com/psviderski/unregistry/blob/main/README.md This command pushes a specific platform variant of a multi-platform Docker image to a remote server. It requires the local Docker environment to be configured with the containerd image store to support multi-platform images effectively. ```shell docker pussh myapp:latest user@server --platform linux/amd64 ``` -------------------------------- ### Pushing Docker Images Using a Custom SSH Host Source: https://github.com/psviderski/unregistry/blob/main/README.md This command demonstrates how to use a custom SSH host alias, defined in `~/.ssh/config`, with the `docker pussh` utility. This simplifies pushing images to remote servers configured with specific SSH settings, leveraging the custom SSH configuration. ```shell docker pussh myapp:latest prod-server ``` -------------------------------- ### Push Docker Image to Remote Server Source: https://github.com/psviderski/unregistry/blob/main/README.md This command pushes a Docker image to a specified remote server using the `docker-pussh` plugin. It requires SSH access to the remote server and the SSH user to have permissions to run Docker commands. ```shell docker pussh myapp:latest user@server.example.com ``` -------------------------------- ### Manage Containerd Images Manually Source: https://github.com/psviderski/unregistry/blob/main/README.md These commands are used for manual management of images within the containerd image store, specifically for the `moby` namespace used by Docker. The first command lists all images, while the second allows for the removal of a specific image, useful for cleaning up unmanaged images. ```shell sudo ctr -n moby images ls sudo ctr -n moby images rm ``` -------------------------------- ### Push Docker Image to Remote Server with Custom SSH Port Source: https://github.com/psviderski/unregistry/blob/main/README.md This command pushes a Docker image to a remote server that is listening for SSH connections on a non-standard port. The custom port is specified after the server address, separated by a colon. ```shell docker pussh myapp:latest user@server:2222 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.