Docker image for Seafile

This thread is deprecated. Please following new thread here: Seafile Server in Docker is ready for testing!

Seafile-Docker

Seafile Docker image based on Ubuntu 16.04 LTS

Source Code: https://github.com/wangyan/docker-seafile

Features

  • Always use the newest version of seafile
  • Configurable to run with MySQL
  • Support Nginx SSl,WebDAV features
  • Auto-setup at initial run.

Install Docker

Debian

apt-get update && apt-get -y install curl && \
curl -sSL https://get.docker.com/ | sh

CentOS

curl -sSL https://get.docker.com/ | sh

Install MySQL

MYSQL_ROOT_PASSWORD MySQL root password

docker run --name mysql \
-v /var/lib/mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-p 3306:3306 \
-d mysql:latest

三、Quickstart

  • IP_OR_DOMAIN IP Address or Domain
  • SEAFILE_ADMIN E-mail address of the Seafile admin
  • SEAFILE_ADMIN_PW Password of the Seafile admin
  • SQLSEAFILEPW Password for Seafile MySQL User

Note By default, you must open 8082 port

docker run --name seafile \
--link mysql:mysql \
-p 8082:8082 \
-p 80:80 \
-p 443:443 \
-e IP_OR_DOMAIN=cloud.wangyan.org \
-e SEAFILE_ADMIN=info@wangyan.org \
-e SEAFILE_ADMIN_PW=123456 \
-e SQLSEAFILEPW=123456 \
-v /home/seafile:/opt/seafile \
-d registry.git.dmfy.gov.cn/wangyan/docker-seafile
docker logs -f seafile // logs...
2 Likes

Thanks. It is better to use the English version as the default readme file.

1 Like

Nice work. I like automation.

I’m getting this message from your registry, SSL error using Docker v1.11.2

Error response from daemon: Get https://registry.git.dmfy.gov.cn/v1/_ping: x509: certificate is valid for git.wangyan.org, not registry.git.dmfy.gov.cn

Workaround is to do git clone https://github.com/wangyan/docker-seafile and then docker build . and finally docker tag <docker-id> wangyan/docker-seafile:latest

end result:

REPOSITORY TAG IMAGE ID CREATED SIZE wangyan/docker-seafile latest b7e0542f85d0 2 minutes ago 403.6 MB wangyan/docker-seafile v2.1.0 b7e0542f85d0 2 minutes ago 403.6 MB

How do you plan to upgrade to the next seafile version? According to the seafile upgrade guide you should execute one or several shell scripts to successfully switch to the next version. Also those shell scripts may contain the new mysql table schemas especially on a major upgrades. But how it will be possible when you are running seafile in a separate container?

Thanks, Paul

Just read this by chance. Though I don’t use docker at the moment as far as I understood it is not the idea to upgrade something in a docker container. If something doesn’t work or the software is outdated you don’t fix/upgrade a container but you throw it away and start a new/upgraded container provided by the maintainer (or build your own). This idea is called “pets versus cattle”.

Hi,

Did you look at the seafile upgrade guide?
We’re talking not about how to switch between different seafile versions within docker container but rather how can you execute shell script which is provided with a new seafile release to make a successfull migration to the next major or minor release.

Hi,

if this is pointing to me: yes I know the upgrade guide. For a minor upgrade you (basically) stop the seafile processes, switch to seafile system user, download the new version, extract it, switch to the new-version-folder /upgrade and for example start a tiny version upgrade with ./minor-upgrade.sh - then the upgrade process should start (for a tiny version upgrade in this case, like 6.0.3 to 6.0.4).

Anway: in my opinion this is not something you do when working with docker containers (in my opinion). For docker you should just kick out your current seafile container and pull the one with the new version. No upgrade script - this is something the container maintainer (@wangyan?) does for you (but maybe I still missunderstand you - sry in this case).