User Tools

Site Tools


docker_project:part_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker_project:part_1 [2025/03/08 16:52] wizardadmindocker_project:part_1 [2025/03/08 17:29] (current) wizardadmin
Line 1: Line 1:
 ====== Docker Project Part 1 ====== ====== Docker Project Part 1 ======
  
-To start off with docker needed to download +To start off with docker needed to download 
-Docker onto the server that I designated to run my webserver and other containers that choose to setup.+Docker onto the server that I designated to run my webserver and other containers that choose to setup
 +I won't cover how to install Docker on a Windows or Linux system as it is heavily covered and can be figured out with a simple google search. After I had docker installed I decided to use Docker Compose to make this webserver. 
 + 
 +For Docker Compose: 
 + 
 +Step 1. I pulled down the PHP image. Command: sudo docker pull php 
 + 
 +Step 2. make a directory in a spot of your choice for the Docker Compose yaml file. 
 +Command: mkdir /path/to/yaml/file 
 + 
 +Step 3. go into the compose directory that you created.  
 +Command: cd /path/to/yaml/file 
 + 
 +Step 4. open a text editor and create a file inside the directory and name it: docker-compose.yaml 
 + 
 +Step 5. I edited this file and wrote in the following below, Please note it serves over port 80 which i used for initial setup and configuration. Later on when I was ready to open it to the internet I changed this open port to server over HTTPS port 443 
 + 
 +version: '3' 
 + 
 +services: 
 +  dokuwiki: 
 +    container_name: dokuwiki 
 +    image: php:7-apache-bullseye 
 +    restart: unless-stopped 
 +    networks: 
 +      - dokuwiki 
 +    ports: 
 +      - '8888:80' 
 +    volumes: 
 +      - 'dokuwiki_config:/var/www/html' 
 + 
 +networks: 
 +  dokuwiki: 
 + 
 +volumes: 
 +  dokuwiki_config: 
 +    driver: local 
 +     
 + 
 +Step 6. when done, save the file. while still inside that directory, run this following command. 
 +command: docker-compose up -d 
 + 
 +Step 7. from there I remoted into the container while ssh'ed into the Docker server. 
 +command: docker exec -it "Container Name" bash 
 + 
 +Step 8. move to the dokuwiki directory. 
 +command: cd /var/www/html 
 + 
 +Step 9. Now download dokuwiki. 
 +Command:  
 +curl --remote-name https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz 
 +tar -xzvf dokuwiki-stable.tgz --strip-components=1 
 +rm dokuwiki-stable.tgz 
 +chown -R www-data:www-data /var/www/ 
 + 
 +Step 10. Now go to http://your_docker_server_IP:8888/install.php in a web browser and you will be greeted with the start configuration for you Dokuwiki server.
  
-  
docker_project/part_1.1741452726.txt.gz · Last modified: 2025/03/08 16:52 by wizardadmin