Docker quickly deploys owncloud
1. Pull the image
docker pull owncloud
docker pull mysql:5.7
2. Start the mysql container (optional)
In fact, owncloud comes with sqllite, but in order to build file index faster and better, I still recommend that we install a MySQL to store data (of course, if you find it troublesome, this step can be omitted and you can skip it directly. Step), below we introduce the quick installation of MySql
docker run --name owncloud-mysql -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=root -d mysql:5.7
3. Start the owncloud container
- Using MySQL:
docker run -p 8080:80 -d --link mysql:mysql -v /data/owncloud/:/var/www/html owncloud
- Without MySQL:
docker run -p 8080:80 -d -v /data/owncloud/:/var/www/html owncloud
explain
--link mysql:mysql
:
is used to connect to the MySQL container created in the previous step so that it can communicate with the MySQL container. You can leave this blank, but the subsequent operations are a little more troublesome. Please refer to the understanding of docker run --link: Here is
-p 80:80
the
purpose Mapping the port in the container to the port of our Raspberry Pi operating system
-v /data/owncloud/:/var/www/html owncloud
:
This step is to map the path inside the container to outside the container, so as to facilitate our file management
-d
: Daemon running, that is, running in the background
4.Access
IP:8080
5. Set up an administrator account
admin/admin123
6.Configure owncloud
- You don’t need to configure it if you don’t use MySQL.