使用docker-compose安装搭建owncloud私有云

Reference:https://github.com/owncloud-docker/server

结果:ownclod v10.0.10 + Mysql +redis

宿主机的共享文件夹路径为

/var/lib/docker/volumes/owncloud_files/_data/files/admin/files

1. 安装docker-ce

  1. 安装docker-ce 参见docker官网
  2. docker-compose

2. 安装owncloud

2.1 设置docker-compose 环境变量

cat << EOF >| .env
OWNCLOUD_VERSION=10.0
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=80
EOF

2.2 下载docker-compose.yml配置文件

wget -O docker-compose.yml https://raw.githubusercontent.com/owncloud-docker/server/master/docker-compose.yml

2.3 构建运行镜像

# Finally start the containers in the background
docker-compose up -d

2.4其他命令

# More commands of interest (try adding -h for help):

docker-compose exec owncloud bash
docker-compose stop
docker-compose start
docker-compose down
docker-compose logs

# By default docker-compose up will start Redis, MariaDB and ownCloud containers, the content gets stored in named volumes persistently. The container ports 80 and 443 are bound as configured in the .env file.

发表评论

电子邮件地址不会被公开。 必填项已用*标注