https://www.linkedin.com/pulse/docker-project-gaurav-yadav/
Under IIEC-RISE 1.0 Campaign I learnt about Docker under the guidance of Vimal Daga Sir. This is my final project using Docker to set-up Nextcloud, Nextcloud is free and open-source. Nextcloud application functionally is similar to Dropbox, Office 365 or Google Drive.
- I am using RedHat Enterprise Linux. Plus I have also installed Docker Software in it. You can use any OS and inside that OS you should have docker software installed. There might be a possibility that some Linux command might be different from other OS but I will explain what is the work of that command.
- Disabling firewall:
- Firewall might block some networking stuffs that's why I at first stopped the firewall.
- Use
systemctl stop firewalld
.
- Starting the docker:
- Use
systemctl start docker
to start Docker Service.
- Use
- Pulling MySQL Image:
- Use
docker pull mysql:5.6
to download the mysql version 5.6 image to use as a database server. - To know more about MySQL Image go to this page: https://hub.docker.com/_/mysql
- Use
- Pulling Nextcloud Image:
- Use
docker pull nextcloud:latest
to download the Nextcloud Image in which apache server is already preconfigured. - To know more about Nextcloud Image go to this page: https://hub.docker.com/_/nextcloud
- Use
- Use
docker run -it -e MYSQL_ROOT_PASSWORD=(any password you like) -e MYSQL_USER=(any user name) -e MYSQL_PASSWORD=(any password(recommended not to use root password) -e MYSQL_DATABASE=(any database name) --name joomladb mysql:5.6
this code and it will create a user with a database inside Your MySQL Server. - Now if you want to see is your database created or not then you have to install MySQL cilent software in your base OS. For that use
yum install mysql
. Next thing check your database server ip address and use that ip while running the client software. For reference check the image below.
- Before using Docker-Compose you should install the software. For reference go to this website : https://docs.docker.com/compose/install/
- You can create and edit this file using vim editor. For that use
vim docker-compose.yml
. I have attached the screenshots of the nextcloud os in screenshots folder.