{"id":21834476,"url":"https://github.com/containerssh/agent","last_synced_at":"2025-04-14T08:43:42.259Z","repository":{"id":42683376,"uuid":"323530083","full_name":"ContainerSSH/agent","owner":"ContainerSSH","description":"The guest agent for ContainerSSH","archived":false,"fork":false,"pushed_at":"2025-03-13T00:34:32.000Z","size":197,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T22:21:56.171Z","etag":null,"topics":["containerssh","library"],"latest_commit_sha":null,"homepage":"https://containerssh.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ContainerSSH.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T05:28:42.000Z","updated_at":"2024-12-14T12:17:24.000Z","dependencies_parsed_at":"2024-08-01T12:18:30.752Z","dependency_job_id":"1858a29e-b010-4afe-9e3d-641fa8f4cc1e","html_url":"https://github.com/ContainerSSH/agent","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"ContainerSSH/library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSSH%2Fagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSSH%2Fagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSSH%2Fagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSSH%2Fagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ContainerSSH","download_url":"https://codeload.github.com/ContainerSSH/agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248850153,"owners_count":21171706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerssh","library"],"created_at":"2024-11-27T20:11:28.397Z","updated_at":"2025-04-14T08:43:42.241Z","avatar_url":"https://github.com/ContainerSSH.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ContainerSSH - Launch Containers on Demand](https://containerssh.github.io/images/logo-for-embedding.svg)](https://containerssh.io/)\n\n\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003ch1 align=\"center\"\u003eContainerSSH Guest Agent\u003c/h1\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/containerssh/agent?style=for-the-badge)](https://goreportcard.com/report/github.com/containerssh/agent)\n[![LGTM Alerts](https://img.shields.io/lgtm/alerts/github/ContainerSSH/agent?style=for-the-badge)](https://lgtm.com/projects/g/ContainerSSH/agent/)\n\nThis is the agent meant to be installed in the containers run by ContainerSSH. While images work without this agent, several features may not be available depending on what the container engine supports. \n\n\u003cp align=\"center\"\u003e\u003cstrong\u003e⚠⚠⚠ Warning: This is a developer documentation. ⚠⚠⚠\u003c/strong\u003e\u003cbr /\u003eThe user documentation for ContainerSSH is located at \u003ca href=\"https://containerssh.io\"\u003econtainerssh.io\u003c/a\u003e.\u003c/p\u003e\n\n## Integrating the agent\n\nThis agent is intended to be integrated into container images. There are two main installation methods:\n\n### Using the base image (recommended)\n\nThis method uses the `containerssh/agent` container image as part of a multistage build:\n\n```\nFROM containerssh/agent AS agent\n\nFROM your-base-image\nCOPY --from=agent /usr/bin/containerssh-agent /usr/bin/containerssh-agent\n# Your other build commands here\n```\n\n### Installing on Debian/Ubuntu\n\nWe have a [Debian repository](https://packages.containerssh.io) containing the agent package. Once you have set up the repository you can install the agent like this:\n\n```bash\napt-get install containerssh-agent\n```\n\n### Installing the binaries\n\nTo use this method go to the [latest release from the releases section](https://github.com/ContainerSSH/agent/releases) and verify it against our [https://containerssh.io/gpg.txt](https://containerssh.io/gpg.txt) key (`3EE5B012FA7B400CD952601E4689F1F0F358FABA`).\n\nOn an Ubuntu image build this would involve the following steps:\n\n```Dockerfile\nARG AGENT_GPG_FINGERPRINT=3EE5B012FA7B400CD952601E4689F1F0F358FABA\nARG AGENT_GPG_SOURCE=https://containerssh.io/gpg.txt\n\nRUN echo \"\\e[1;32mInstalling ContainerSSH guest agent...\\e[0m\" \u0026\u0026 \\\n    DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confold' update \u0026\u0026 \\\n    DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confold' -fuy --allow-downgrades --allow-remove-essential --allow-change-held-packages install gpg \u0026\u0026 \\\n    wget -q -O - https://api.github.com/repos/containerssh/agent/releases/latest | grep browser_download_url | grep -e \"agent_.*_linux_amd64.deb\" | awk ' { print $2 } ' | sed -e 's/\"//g' \u003e /tmp/assets.txt \u0026\u0026 \\\n    wget -q -O /tmp/agent.deb $(cat /tmp/assets.txt |grep -v .sig) \u0026\u0026 \\\n    wget -q -O /tmp/agent.deb.sig $(cat /tmp/assets.txt |grep .sig) \u0026\u0026 \\\n    wget -q -O - $AGENT_GPG_SOURCE | gpg --import \u0026\u0026 \\\n    echo -e \"5\\ny\\n\" | gpg --command-fd 0 --batch --expert --edit-key $AGENT_GPG_FINGERPRINT trust \u0026\u0026 \\\n    test $(gpg --status-fd=1 --verify /tmp/agent.deb.sig /tmp/agent.deb | grep VALIDSIG | grep $AGENT_GPG_FINGERPRINT | wc -l) -eq 1 \u0026\u0026 \\\n    dpkg -i /tmp/agent.deb \u0026\u0026 \\\n    rm -rf /tmp/* \u0026\u0026 \\\n    rm -rf ~/.gnupg \u0026\u0026 \\\n    DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confold' -fuy --allow-downgrades --allow-remove-essential --allow-change-held-packages remove gpg \u0026\u0026 \\\n    DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confold' -y clean \u0026\u0026 \\\n    /usr/bin/containerssh-agent -h\n```\n\nYou can look at the default [guest image Dockerfile](https://github.com/containerssh/guest-image) for an example on Ubuntu.\n\n## How this application works\n\nThis application is intended as a single binary to be embedded into a container image to handle features that the container engine (Docker, Kubernetes) does not support. Currently, the following modes are supported:\n\n```bash\n# Run in Console mode\n./agent console --env FOO=bar --env TERM=xterm --wait --pid -- /bin/bash\n\n# Run in Signal mode\n./agent signal --pid 3 --signal TERM\n```\n\nThe console mode supports the following parameters:\n\n- `console` sets the agent to console mode.\n- `env` passes an environment variable to the desired program.\n- `wait` waits for a `\\0` byte on the `stdin` before launching the desired program.\n- `pid` writes the process ID of the program to the `stdout` in the first 4 bytes as a little-endian `uint32` before launching the program.\n\nThe signal mode supports the following parameters:\n\n- `signal` sets the agent to signal mode.\n- `pid` passes the process ID to send the signal to.\n- `signal` sets the signal to send. These are defined in [RFC 4254 Section 6.9](https://tools.ietf.org/html/rfc4254#section-6.9).\n\nThe detailed usage is documented in [USAGE.md](USAGE.md).\n\n## Building this application\n\nThis application can be built by running the following two programs:\n\n- `go generate`\n- `go build `\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerssh%2Fagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontainerssh%2Fagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerssh%2Fagent/lists"}