docker 部署seafile

文章目录

  • 拉取镜像
  • 运行docker 容器
  • 访问seafile主页
  • 修改相关配置
  • 待解决问题
  • 记一次异常

拉取镜像

建议使用最新版本

docker pull seafileltd/seafile  #seafile 6.3.4版本

运行docker 容器

docker run -d --name seafile \
  -e SEAFILE_SERVER_HOSTNAME=10.183.34.3  \
  -v /data/seafile:/shared \
  -p 80:80 \
  seafileltd/seafile:latest

访问seafile主页

输入以下网址

http://10.183.34.3

修改相关配置

这个是加在这个配置里面的,这里都是控制上传和下载的文件大小的配置,这是在seafile.conf里的

[fileserver]
#最大上传文件单位为MB,为1TB
max_upload_size=1048576
#最大下载目录为MB,为1TB
max_download_dir_size=1048576

待解决问题

1.上传目录时,如果其中包含很多文件时报错.想要修改相关配置,官网文档没有给出,只给出上传,以及下载的修改方法。
2.估计应该是seafile的版本太低了,现在seafile已经出到7.0了。

Maximum number of files exceeded 

记一次异常

今天遇到doker seafile 不知道什么原因,意外挂掉了,进行一段操作后,得知seafile 的docker 容器没有启动,具体操作如下:


[root@ieat1 ~]# docker images
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
docker.io/nginx                     latest              98ebf73aba75        7 weeks ago         109 MB
docker.io/mysql                     latest              de764ad211de        7 weeks ago         443 MB
docker.io/redis                     latest              598a6f110d01        8 weeks ago         118 MB
docker.io/fauria/vsftpd             latest              4900fef1a627        4 months ago        261 MB
docker.io/seafileltd/seafile        latest              68e4dbd7c90d        6 months ago        1.03 GB
docker.io/rancher/scheduler         v0.8.6              fbedeaddc3e9        7 months ago        248 MB
docker.io/rancher/agent             v1.2.11             1cc7591af4f5        13 months ago       243 MB
docker.io/rancher/net               v0.13.17            f170c38e3763        13 months ago       311 MB
docker.io/rancher/dns               v0.17.4             678bde0de4d2        14 months ago       249 MB
docker.io/rancher/healthcheck       v0.3.8              ce78cf69cc0b        14 months ago       391 MB
docker.io/rancher/metadata          v0.10.4             02104eb6e270        14 months ago       251 MB
docker.io/rancher/network-manager   v0.7.22             13381626c510        14 months ago       256 MB
docker.io/rancher/net               holder              665d9f6e8cc1        2 years ago         267 MB
[root@ieat1 ~]# docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS                                                            NAMES
c55024ac8bb8        rancher/scheduler:v0.8.6          "/.r/r /rancher-en..."   About an hour ago   Up About an hour                                                                     r-scheduler-scheduler-1-421bef1d
3d785f39c0f3        fauria/vsftpd                     "/usr/sbin/run-vsf..."   5 weeks ago         Up 2 days           0.0.0.0:20-21->20-21/tcp, 0.0.0.0:21100-21110->21100-21110/tcp   vsftpd
abd4d5d89b20        rancher/dns:v0.17.4               "/rancher-entrypoi..."   5 weeks ago         Up 2 days                                                                            r-network-services-metadata-dns-5-3a54b7e3
19289cb5b39b        rancher/healthcheck:v0.3.8        "/.r/r /rancher-en..."   5 weeks ago         Up 2 days                                                                            r-healthcheck-healthcheck-5-bdacdf26
e0606c299ed1        rancher/metadata:v0.10.4          "/rancher-entrypoi..."   5 weeks ago         Up 2 days                                                                            r-network-services-metadata-5-944c46f4
ce1e6f7ee4e4        rancher/network-manager:v0.7.22   "/rancher-entrypoi..."   5 weeks ago         Up 2 days                                                                            r-network-services-network-manager-5-ae860036
7ec9b65e37f1        rancher/net:v0.13.17              "/rancher-entrypoi..."   5 weeks ago         Up 2 days                                                                            r-ipsec-cni-driver-5-64a39019
d938c0feaae7        rancher/agent:v1.2.11             "/run.sh run"            7 weeks ago         Up 2 days                                                                            rancher-agent
[root@ieat1 ~]# docker run -d --name seafile \
>   -e SEAFILE_SERVER_HOSTNAME=10.**.**.161  \
>   -v /data/seafile:/shared \
>   -p 80:80 \
>   seafileltd/seafile:latest
/usr/bin/docker-current: Error response from daemon: Conflict. The container name "/seafile" is already in use by container 7ab1eff1276aa4045c492eaa2412657c3fe46812acd7d90ca0edbf7e59b7132e. You have to remove (or rename) that container to be able to reuse that name..
See '/usr/bin/docker-current run --help'.
[root@ieat1 ~]# docker ps -l
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS               NAMES
c55024ac8bb8        rancher/scheduler:v0.8.6   "/.r/r /rancher-en..."   About an hour ago   Up About an hour                        r-scheduler-scheduler-1-421bef1d
[root@ieat1 ~]# docker remove 7ab1eff1276aa4045c492eaa2412657c3fe46812acd7d90ca0edbf7e59b7132e
docker: 'remove' is not a docker command.
See 'docker --help'
[root@ieat1 ~]# docker rm 7ab1eff1276aa4045c492eaa2412657c3fe46812acd7d90ca0edbf7e59b7132e
7ab1eff1276aa4045c492eaa2412657c3fe46812acd7d90ca0edbf7e59b7132e
[root@ieat1 ~]# docker run -d --name seafile   -e SEAFILE_SERVER_HOSTNAME=10.36.31.161    -v /data/seafile:/shared   -p 80:80   seafileltd/seafile:latest
94d78593ff52503b9dbc250d08cca04a02a87d66a6e250525792a09ab8aa6a48

reference: https://cloud.seafile.com/published/seafile-manual-cn/config/seafile-conf.md

你可能感兴趣的:(docker,seafile,seafile)