[LINUX] Use WebDAV in a Portable Docker environment

Overview

Use WebDAV to create an environment to access Linux files in the USB memory from Windows Explorer.

Why webDAV

I think that it is common to use samba when you want to access Linux files on a virtualized PC with Windows Explorer, but it seemed to be extremely troublesome to set due to port numbers etc., so I decided to use WebDAV.

Docker container

Probably there is no official container due to demand, so basically enable WebDAV with default disabled based on Official Apache using httpd container It seems that the theory is to create a Dockerfile that makes various settings.

It's a hassle, so use bytemark / webdav. As of August 2020, it seems that the most used WebDAV container is devised so that necessary items can be set with environment variables.

If you want to create your own Dockerfile, this article may be helpful.

compose file

Assuming that a server is set up on Linux in a USB memory So, in the direction of ignoring the security gun.

ANONYMOUS_METHODS: ALL enables anonymous access without authentication for all methods. Even so, if you do not set the authentication method to Digest and set the user name and password, it seems that an error will occur even if you access from Windows.

If you set [Arbitrary directory]: / var / lib / dav / data in volume, [Arbitrary directory] will be the root folder when accessed by WebDAV.

webdav:
  image: bytemark/webdav
  restart: always
  ports:
    - "80:80"
  environment:
    AUTH_TYPE: Digest
    USERNAME: user
    PASSWORD: abcdefgh
    ANONYMOUS_METHODS: ALL
  volumes:
    - /root:/var/lib/dav/data

Doing this in a directory somewhere on Linux docker-compose -up will start the WebDAV server.

Access from Windows

If there is no problem with the setting, in the address bar of Explorer

\\localhost@80\DavWWWRoot

Then you should see the files and folders on the Linux side.

Assign to drive

SUBST allows you to assign a WebDAV folder to any drive letter without administrator privileges.

Even software that does not work with the above UNC path may work if you assign a drive letter.

subst Z: \\localhost@80\DavWWWRoot

In fact, Visual Studio Code doesn't work when I try to open a folder with a UNC path (it opens a completely unrelated folder), but assigning a drive letter works.

The title bar shows a disconnected network drive, but it seems to be connected.

Recommended Posts

Use WebDAV in a Portable Docker environment
Use the latest pip in a virtualenv environment
Use a free GPU in your favorite environment
Use Anaconda in pyenv environment
Flutter in Docker-How to build and use a Flutter development environment inside a Docker container
Collaborate in a remote environment
Use Sudachipy's learned word2vec in a low memory environment
Build a Docker environment that can use PyTorch and JupyterLab
Run eclipse in Docker environment (noVNC)
Build a go environment using Docker
Use django-debug-toolbar in VirtualBox / Vagrant environment
Learn how to use Docker through building a Django + MySQL environment
Install Django in a pipenv virtual environment
Use print in a Python2 lambda expression
Use tensorflow in an environment without root
Using venv in Windows + Docker environment [Python]
Use a scikit-learn model trained in PySpark
Get a local DynamoDB environment with Docker
Create a Python-GUI app in Docker (PySimpleGUI)
[Linux] Build a jenkins environment with Docker
Use Python3's Subprocess.run () in a CGI script
Creating a virtual environment in an Anaconda environment
Introduction to docker Create ubuntu environment in ubuntu
Install CaboCha in a non-Anaconda environment (Win)
Introduce graphviz into a portable python environment
I started Node.js in a virtual environment
[Linux] Build a Docker environment with Amazon Linux 2
I wanted to use jupyter notebook with docker in pip environment (opticspy)
Build a LAMP environment on your local Docker
Build a LAMP environment in a very short time
Create a Vim + Python test environment in 1 minute
Hello World with gRPC / go in Docker environment
System switching occurs in a CentOS 7 cluster environment
Ubuntu18.04.05 Creating a python virtual environment in LTS
Start Django in a virtual environment with Pipenv
Create a virtual environment with conda in Python
[Python] Build a Django development environment with Docker
Build a Django environment with Vagrant in 5 minutes
Super easy! Python + Flask environment in Docker quickly
Use the Kaggle API inside a Docker container
Use Python in your environment from Win Automation
Set a fixed IP in the Linux environment
Think about building a Python 3 environment in a Mac environment
Work in a virtual environment with Python virtualenv.
Use jupyter-lab installed in python virtual environment (venv)
Use Python in Anaconda environment with VS Code
Use python in Docker container as Pycharm interpreter
Build a Minecraft plugin development environment in Eclipse
Use pydantic when reading environment variables in Python
Use os.getenv to get environment variables in Python
[Django] Use VS Code + Remote Containers to quickly build a Django container (Docker) development environment.
Japanese can be used with Python in Docker environment
Recommendation of building a portable Python environment with conda
Building a Docker working environment for R and Python
A memorandum on how to use keras.preprocessing.image in Keras
How to build a Django (python) environment on docker
[Go + Gin] I tried to build a Docker environment
Convenient to use matplotlib subplots in a for statement
How to use jupyter lab in Windows 10 local environment
Build a development environment with Poetry Django Docker Pycharm
Setting up Jupyter Lab in a Python 3.9 venv environment