docker_project:part_1
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker_project:part_1 [2025/03/08 16:21] – created wizardadmin | docker_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 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 / | ||
+ | |||
+ | Step 3. go into the compose directory that you created. | ||
+ | Command: cd / | ||
+ | |||
+ | 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: ' | ||
+ | |||
+ | services: | ||
+ | dokuwiki: | ||
+ | container_name: | ||
+ | image: php: | ||
+ | restart: unless-stopped | ||
+ | networks: | ||
+ | - dokuwiki | ||
+ | ports: | ||
+ | - ' | ||
+ | volumes: | ||
+ | - ' | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | Step 8. move to the dokuwiki directory. | ||
+ | command: cd / | ||
+ | |||
+ | Step 9. Now download dokuwiki. | ||
+ | Command: | ||
+ | curl --remote-name https:// | ||
+ | tar -xzvf dokuwiki-stable.tgz --strip-components=1 | ||
+ | rm dokuwiki-stable.tgz | ||
+ | chown -R www-data: | ||
+ | |||
+ | Step 10. Now go to http:// | ||
docker_project/part_1.1741450890.txt.gz · Last modified: 2025/03/08 16:21 by wizardadmin