mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-20 13:04:25 +02:00
docker containers change to user seaweed
1 parent
c66632f27b
commit
e1667dde21
2 files changed
+10
-2
No files matched your search
+3
-1
@@ -185,6 +185,8 @@ Alternatively, you can mount a directory on the host machine into the container:
|
||||
docker run --name weed -d -p 9333:9333 -p 8080:8080 -p 18080:18080 \
|
||||
-v /opt/weedfs/data:/data chrislusf/seaweedfs server -dir="/data"
|
||||
```
|
||||
The Docker image now defaults to the non-root `seaweed` user. If you bind-mount a host directory, make sure it is writable by UID/GID `1000:1000`, or start the container with `--user root` on first run so the entrypoint can repair `/data` ownership before dropping privileges.
|
||||
|
||||
Note that according to [Docker's documentation](https://docs.docker.com/storage/volumes/), volumes are the preferred mechanism for persisting data.
|
||||
|
||||
|
||||
@@ -192,4 +194,4 @@ Note that according to [Docker's documentation](https://docs.docker.com/storage/
|
||||
Now our SeaweedFS server will be persistent and accessible by localhost:9333, :8080 and :18080 on host machine.
|
||||
Dont forget to specify "-publicIp" for correct connectivity.
|
||||
|
||||
[Using SeaweedFS in kubernetes(k8s)](https://github.com/seaweedfs/seaweedfs/wiki/Deployment-to-Kubernetes-and-Minikube)
|
||||
[Using SeaweedFS in kubernetes(k8s)](https://github.com/seaweedfs/seaweedfs/wiki/Deployment-to-Kubernetes-and-Minikube)
|
||||
@@ -26,6 +26,12 @@ mkdir -p /mnt/{cch,cld,seaweedfs}
|
||||
mkdir -p /mnt/seaweedfs/{filer,master,metabackup,volume}
|
||||
```
|
||||
|
||||
The published Docker image now defaults to the non-root `seaweed` user (UID/GID `1000:1000`). Since this stack bind-mounts host directories and overrides the image entrypoint with custom scripts, make those directories writable by `1000:1000` before deployment. A simple option is:
|
||||
|
||||
```
|
||||
chown -R 1000:1000 /mnt/seaweedfs
|
||||
```
|
||||
|
||||
+ On a Swarm master node:
|
||||
|
||||
```
|
||||
@@ -282,4 +288,4 @@ docker run \
|
||||
|
||||
mount_proc=$!
|
||||
wait "$mount_proc"
|
||||
```
|
||||
```
|
||||
Reference in new issue
Block a user