Implement NextCloud using Docker

nextcloud

Implement NextCloud using Docker

Install Docker Engine on Linux Server (Ubuntu)

Add Docker’s official GPG key:

sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg

Add the repository to Apt sources:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update

To install the latest version, run:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Verify that the Docker Engine installation is successful by running the hello-world image.

sudo docker run hello-world

Configuration of Docker

Create network

sudo docker network create my-network

Install NextCloud

sudo docker --name my-nextcloud -p 8080:80 --network my-network -d nextcloud

Install Mysql

sudo docker --name mysql --network my-network -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql

Install Adminer

sudo docker --name my-adminer --network my-network --link mysql:db -p 9000:8080 -d adminer

  • Access localhost:9000 to login Mysql
  • Create a new database
  • Access localhost:8080 to create a user for nextcloud
  • input the database information

Enjoy

  • nextcloud
  • adminer

Leave a Comment

Your email address will not be published. Required fields are marked *