{"id":13707075,"url":"https://github.com/linode/docker-volume-linode","last_synced_at":"2025-06-27T23:06:44.340Z","repository":{"id":34373669,"uuid":"139534107","full_name":"linode/docker-volume-linode","owner":"linode","description":"Docker Volume driver for Linode Block Storage","archived":false,"fork":false,"pushed_at":"2025-04-17T17:11:15.000Z","size":253,"stargazers_count":48,"open_issues_count":0,"forks_count":20,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-18T07:48:54.737Z","etag":null,"topics":["docker","docker-plugin","docker-volume","go","golang","volume"],"latest_commit_sha":null,"homepage":"","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/linode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-03T05:45:06.000Z","updated_at":"2025-04-17T17:10:18.000Z","dependencies_parsed_at":"2023-10-10T22:18:59.252Z","dependency_job_id":"78e96933-1ada-4deb-a6cf-0e1476254ebd","html_url":"https://github.com/linode/docker-volume-linode","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fdocker-volume-linode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fdocker-volume-linode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fdocker-volume-linode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fdocker-volume-linode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linode","download_url":"https://codeload.github.com/linode/docker-volume-linode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593275,"owners_count":21773439,"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":["docker","docker-plugin","docker-volume","go","golang","volume"],"created_at":"2024-08-02T22:01:17.923Z","updated_at":"2025-05-05T23:32:01.150Z","avatar_url":"https://github.com/linode.png","language":"Go","readme":"# Docker Volume Driver For Linode\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/linode/docker-volume-linode/linode.svg)](https://pkg.go.dev/github.com/linode/docker-volume-linode/)\n[![Build](/../../actions/workflows/pull_request.yml/badge.svg)](/../../actions/workflows/pull_request.yml)\n\nThis [volume plugin](https://docs.docker.com/engine/extend/plugins_volume/) adds the ability to manage [Linode Block Storage](https://www.linode.com/blockstorage) as [Docker Volumes](https://docs.docker.com/storage/volumes/) from within a Linode.\n[Good use cases for volumes](https://docs.docker.com/storage/#good-use-cases-for-volumes) include off-node storage to avoid size constraints or moving a container and the related volume between nodes in a [Swarm](https://github.com/linode/docker-machine-driver-linode#provisioning-docker-swarm).\n\n## Requirements\n\n- Linux (tested on Fedora 34, should work with other versions and distributions)\n- Docker (tested on version 20, should work with other versions)\n\n## Installation\n\n```sh\ndocker plugin install --alias linode --grant-all-permissions \\\nlinode/docker-volume-linode \\\nlinode-token=\u003clinode token\u003e\n```\n\n### Driver Options\n\n| Option Name | Description |\n| --- | --- |\n| linode-token | **Required** The Linode APIv4 [Personal Access Token](https://cloud.linode.com/profile/tokens) to use. (requires `linodes:read_write volumes:read_write events:read_only`)\n| linode-label | The label of the current Linode. This is only necessary if your Linode does not have a resolvable Link Local IPv6 Address.\n| force-attach | If true, volumes will be forcibly attached to the current Linode if already attached to another Linode. (defaults to false) WARNING: Forcibly reattaching volumes can result in data loss if a volume is not properly unmounted.\n| mount-root | Sets the root directory for volume mounts (defaults to /mnt) |\n| log-level | Sets log level to debug,info,warn,error (defaults to info) |\n| socket-user | Sets the user to create the docker socket with (defaults to root) |\n\nOptions can be set once for all future uses with [`docker plugin set`](https://docs.docker.com/engine/reference/commandline/plugin_set/#extended-description).\n\n### Changing the plugin configuration\n\nThe plugin can also be configured (or reconfigured) in multiple steps.\n\n```sh\ndocker plugin install --alias linode linode/docker-volume-linode\ndocker plugin disable linode\ndocker plugin set linode linode-token=\u003clinode token\u003e\ndocker plugin enable linode\n```\n\n- For all options see [Driver Options](#Driver-Options) section\n\n### Docker Swarm\n\nVolumes can be mounted to one container at the time because Linux Block Storage volumes can only be attached to one Linode at the time.\n\n## Usage\n\nAll examples assume the driver has been aliased to `linode`.\n\n### Create Volume\n\nLinode Block Storage volumes can be created and managed using the [docker volume create](https://docs.docker.com/engine/reference/commandline/volume_create/) command.\n\n```sh\n$ docker volume create -d linode my-test-volume\nmy-test-volume\n```\n\nIf a named volume already exists on the Linode account and it is in the same region of the Linode, it will be reattached if possible.  A Linode Volume can be attached to a single Linode at a time.\n\n#### Create Options\n\nThe driver offers [driver specific volume create options](https://docs.docker.com/engine/reference/commandline/volume_create/#driver-specific-options):\n\n| Option | Type | Default | Description |\n| ---    | ---  | ---     | ---         |\n| `size` | int  | `10`    | the size (in GB) of the volume to be created.  Volumes must be at least 10GB in size, so the default is 10GB.\n| `filesystem` | string | `ext4` | the filesystem argument for `mkfs` when formating the new (raw) volume (xfs, btrfs, ext4)\n| `delete-on-remove` | bool | `false`| if the Linode volume should be deleted when removed\n\n```sh\n$ docker volume create -o size=50 -d linode my-test-volume-50\nmy-test-volume-50\n```\n\nVolumes can also be created and attached from `docker run`:\n\n```sh\ndocker run -it --rm --mount volume-driver=linode,source=test-vol,destination=/test,volume-opt=size=25 alpine\n```\n\nMultiple create options can be supplied:\n\n```sh\ndocker run -it --rm --mount volume-driver=linode,source=test-vol,destination=/test,volume-opt=size=25,volume-opt=filesystem=btrfs,volume-opt=delete-on-remove=true alpine\n```\n\n### List Volumes\n\n```sh\n$ docker volume ls\nDRIVER              VOLUME NAME\nlinode:latest       my-test-volume\nlinode:latest       my-test-volume-50\n```\n\n### Use Volume\n\n```sh\n$ docker run --rm -it -v my-test-volume:/usr/local/apache2/htdocs/ httpd\n...\n```\n\n### Remove Volumes\n\n```sh\n$ docker volume rm my-test-volume\nmy-test-volume\n\n$ docker volume rm my-test-volume-50\nmy-test-volume-50\n```\n\n## Manual Installation\n\n- Install Golang: \u003chttps://golang.org/\u003e\n- Get code and Compile: `go get -u github.com/linode/docker-volume-linode`\n\n### Run the driver\n\n```sh\ndocker-volume-linode --linode-token=\u003ctoken from linode console\u003e\n```\n\n### Debugging\n\n#### Enable Debug Level on plugin\n\nThe driver name when running manually is the same name as the socket file.\n\n```sh\ndocker plugin set docker-volume-linode log-level=debug\n```\n\n#### Enable Debug Level in manual installation\n\n```sh\ndocker-volume-linode --linode-token=\u003c...\u003e --log-level=debug\n```\n\n## Development\n\nA great place to get started is the Docker Engine managed plugin system [documentation](https://docs.docker.com/engine/extend/#create-a-volumedriver).\n\n## Running Integration Tests\n\nThe integration tests for this project can be easily run using the `make int-test` target.\nThis target provisions and connects to a Linode instance, uploads the plugin, builds it, enables it, \nand runs the integration test suite. Subsequent runs of this target will re-use the existing Linode instance.\n\nIn order to run this target, Ansible and the [Linode Ansible Collection](https://github.com/linode/ansible_linode/)\nmust be installed on the local machine:\n\n```bash\npip install ansible\n\nansible-galaxy collection install linode.cloud\n\npip install -r https://raw.githubusercontent.com/linode/ansible_linode/main/requirements.txt\n```\n\nThe integration test suite also requires that a full-access [Linode Personal Access Token](https://www.linode.com/docs/products/tools/api/guides/manage-api-tokens/)\nbe exported as the `LINODE_TOKEN` environment variable.\n\n```bash\nexport LINODE_TOKEN=EXAMPLETOKEN\n```\n\nThe integration test suite can now be run:\n\n```bash\nmake int-test\n```\n\nNOTE: This target requires an existing SSH key be created. If an SSH key exists at a path other than\n`~/.ssh/id_rsa`, the `QUICKTEST_SSH_PUBKEY` argument can be specified:\n\n```bash\nmake QUICKTEST_SSH_PUBKEY=\"~/.ssh/mykey.pub\" int-test\n```\n\nIf you would like to create a test environment for docker-volume-linode without running the integration test suite, \nthe `QUICKTEST_SKIP_TESTS` argument can be specified:\n\n```bash\nmake QUICKTEST_SKIP_TESTS=1 int-test\n```\n\n## Discussion / Help\n\nJoin us at [#linodego](https://gophers.slack.com/messages/CAG93EB2S) on the [gophers slack](https://gophers.slack.com)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinode%2Fdocker-volume-linode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinode%2Fdocker-volume-linode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinode%2Fdocker-volume-linode/lists"}