用docker 安装 owncloud

Step 1. Launch a PostgreSQL container

docker run --name owncloud-postgresql -itd --restart=always \
  --env 'DB_NAME=owncloud_db' \
  --env 'DB_USER=owncloud' --env 'DB_PASS=password' \
  --volume /file/owncloud/postgresql:/var/lib/postgresql \
  sameersbn/postgresql:9.6-2

Step 2. Launch the ownCloud php-fpm container

docker run --name owncloud -itd --restart=always \
  --env OWNCLOUD_URL=http://cloud.gem-soft.com \
  --link owncloud-postgresql:postgresql \
  --volume /file/owncloud/owncloud:/var/lib/owncloud \
  sameersbn/owncloud:9.1.4 app:owncloud

Step 3. Launch a NGINX frontend container

docker run --name owncloud-nginx -itd --restart=always \
  --link owncloud:php-fpm \
  --publish 10085:80 \
  sameersbn/owncloud:9.1.4 app:nginx
用docker 安装 owncloud
Share this