yyz00
(yz y)
May 7, 2024, 12:45pm
1
Hello everyone, I installed docker pre-installed on Ubuntu 24 system.I want to use docker to load nas-tools and Jellyfin to build a nas.BUT,When I want to map a folder, I find that the folder mapping in the root directory will fail, but the folder mapping in the home directory will succeed.for example:
services:
nas-tools:
image: hsuyelin/nas-tools:latest
ports:
- 3000:3000
volumes:
- /home/admin//docker-compose/nas-tools:/config
- /home/admin/video:/video
environment:
- user=root
- UMASK=000
will work good.but:
services:
nas-tools:
image: hsuyelin/nas-tools:latest
ports:
- 3000:3000
volumes:
- /home/admin/docker-compose/nas-tools:/config
- /data1/video:/video
environment:
- user=root
- UMASK=000
will failedļ¼ /data is a folder mounted on another diskI canāt read or write any file in /data1/video by docker volumes.
This is really bothering me. Can someone help me?
meyay
(Metin Y.)
May 8, 2024, 5:51am
2
We usually need the following information to understand the issue:
How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.
On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:
docker info
docker version
Review the output before sharing and remove confidential data if any appears (public IP for example)
dpkg -l | grep docker
snap list docker
When you share the outputs, always format your posts according to the following guide: How to format your forum posts
yyz00
(yz y)
May 8, 2024, 7:39am
3
Thanks,meyay.I have installed docker when Install Ubuntu 24,here is my outoput info:
my docker info output:
Client:
Version: 24.0.5
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.20.3
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 4
Running: 4
Paused: 0
Stopped: 0
Images: 5
Server Version: 24.0.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version:
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-31-generic
Operating System: Ubuntu Core 22
OSType: linux
Architecture: x86_64
CPUs: 3
Total Memory: 7.261GiB
Name: nas
ID: 71b3aa9d-b336-4c59-8ae7-dac13dd522a1
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
my docker version output:
Client:
Version: 24.0.5
API version: 1.43
Go version: go1.20.8
Git commit: ced0996
Built: Sat Oct 7 00:14:00 2023
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 24.0.5
API version: 1.43 (minimum version 1.12)
Go version: go1.20.8
Git commit: a61e2b4
Built: Sat Oct 7 00:14:30 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
My dpkg -l | grep docker
output is NULL
My snap list docker
output is:
Name Version Rev Tracking Publisher Notes
docker 24.0.5 2915 latest/stable canonicalā -
rimelek
(Ćkos TakĆ”cs)
May 8, 2024, 11:02am
4
Uninstall that and install Docker from the official documentation
The snap version is a docker deamon in a container. You canāt mount everything.
1 Like
meyay
(Metin Y.)
May 8, 2024, 5:53pm
5
To extend on the response of @rimelek : the snap package is not vanilla docker and does not behave like vanilla docker in every way.
The observed restriction is a design choice of the snap package maintainer:
If you want to replace it with vanilla docker-ce from Dockerās repositories, you need to uninstall the snap package first:
sudo snap remove --purge docker
And then install it according to the link @rimelek shared.
2 Likes
yyz00
(yz y)
May 9, 2024, 2:09am
6
Thanks!when uninstall sanp docker and reinstall the docker by apt,it can map root directory!