Relevant information:
[Study Docker] Section: Docker + Alpine + Openssh + Supervisor deploy Linux foundation environment
[Study Docker] Section II: Installation alpine-pkg-glibc, java deployment environment
[Study Docker] Section III: compression and image import and export
In the second section, we docker run by the -v D: \ tmp: / mnt / tmp directory to host the parameters to mount the container. This section describes another way to mount the external directory.
First, the docker run plus --cap-add SYS_ADMIN --cap-add DAC_READ_SEARCH parameters, as follows:
docker run --name alpine-glibc -p 10022:22 -p 9001:9001 --cap-add SYS_ADMIN --cap-add DAC_READ_SEARCH -it highlevel/alpine-server:glibc
You can then use the mount command to load a file shared network folders within the container, the following command:
# 用用户/密码登录
mount -t cifs //<host>/<path> /<localpath> -o user=<user>,password=<user>
# 用游客登录
mount -t cifs //<host>/<path> /<localpath> -o guest