Sign inSign up

alcapone1933plugin/local-mapping

By alcapone1933plugin

Updated over 1 year ago

Docker volume plugin for local-mapping

Plugin
0

470

alcapone1933plugin/local-mapping repository overview

Docker volume plugin for local-mapping

This plugin allows you to map local folder to volume.

Usage

1 - Install the plugin
mkdir /data
docker plugin install alcapone1933plugin/local-mapping --alias local-mapping
or to enable debug
mkdir /data
docker plugin install alcapone1933plugin/local-mapping DEBUG=1 --alias local-mapping
or to change where plugin state is stored
docker plugin install alcapone1933plugin/local-mapping state.source=<any_folder> --alias local-mapping
or to change where local folder is stored # default root.source=/data
when create volme, make sure the path is relative to the root.source, the real path is root.source + mountpoint(args)
mkdir <any_folder>
docker plugin install alcapone1933plugin/local-mapping root.source=<any_folder> --alias local-mapping

2 - Create a volume
$ docker volume create -d local-mapping -o mountpoint=/path/to/folder local-volume
local-volume
$ docker volume ls
DRIVER              VOLUME NAME
local               e1496dfe4fa27b39121e4383d1b16a0a7510f0de89f05b336aab3c0deb4dda0e
local-mapping:latest   local-volume

3 - Use the volume
$ docker run -it -v local-volume:<path> busybox ls <path>
example
docker volume create -d local-mapping -o mountpoint=/tmp tmp

Tag summary

Content type

Plugin

Digest

sha256:b25fe0718

Size

10.6 MB

Last updated

over 1 year ago

docker plugin install alcapone1933plugin/local-mapping