User Tools

Site Tools


docker_project:part_1

This is an old revision of the document!


Docker Project Part 1

To start off with docker I needed to download Docker onto the server that I designated to run my webserver and other containers that I 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:

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.1741454134.txt.gz · Last modified: 2025/03/08 17:15 by wizardadmin