docker-fs

command module
v0.0.0-...-6cbfa07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

Docker-fs.

Go Coverage Status

Mounts your docker container FS into a local directory.

Build

Build with go compiler >= 1.12.

$ go build

Usage.

Find your running container id with docker ps:

$ docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS
a80d96fa4c91        web-installer_development   "./backend --log.for…"   18 hours ago        Up 18 hours
...

Mount your container FS into local directory:

$ docker-fs --id a80d96fa4c91 --mount ./mnt
...

Inspect ./mnt content with cd, ls, cat, mc or any file manager you prefer.

To unmount directory interrupt running docker-fs process with CTRL+C.

(You can also unmount directory with command fusermount -u $(pwd)/mnt.)

Technical details and limitations.

  • docker-fs works via docker API, so it can work with either local or remote docker servers. (currently only local docker through unix-socket is implemented).

  • File system is implemented using GO-FUSE library which implements FUSE (File systems in USEr space) protocol.

  • Due to previous point (FUSE) docker-fs works on Linux, macOS, and possibly works somehow in WSL on Windows.

  • macOS users should install FUSE for macOS first.

  • Currently docker-fs supports only reading and modification of existing files over mounted FS. Creating of new files/directories, setting attributes is going to be done later.

  • Directories, regular files and symlinks are well supported. Other types support is in progress.

  • Empty directories are not shown due to current implementation.

TODO

  • Fix ussie with newly added directories.

  • Tests.

  • Add read-only mode.

  • Option to make absolute symlinks to point on files inside mount directory.

  • Caching.

  • Mkdir and file crating support.

  • Other FS features...

  • Daemonization

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib
log
tui
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL