Das ist eine alte Version von Testing/Docker vom 25.05.2025 13:18 bearbeitet durch EoNy.

Quelltext der Seite Docker

{{toc}}

WackoWiki DockerRepo: https://hub.docker.com/r/trojer/wackowiki


DokuWiki: ((https://www.patreon.com/posts/42961375 Running DokuWiki on Docker))
  * https://hub.docker.com/r/dokuwiki/dokuwiki
  * https://github.com/dokuwiki/docker


====Docker Starter====
=====1. Projektordner festlegen=====

=====2. Docker und Docker Compose ====
%%(cl) sudo zypper refresh%% 
%%(cl) sudo zypper in docker docker-compose%%

=====2.1 Docker Programme ====
%%(cl) docker image ls%% 
%%(cl) docker build -t trojer/wackowiki:latest .%%
%%(cl) docker compose up%% 


docker ps
docker rmi -f $(docker images -f "dangling=true" -q)


====4. Docker-compose.yml und Dockerfile ====



#||
|| 
**docker-compose.yml**

%%(php)
---
services:
    wacko:
        image: trojer/wackowiki:latest
        # image: trojer/wackowiki:0.1.1
        ports: 
            - '10080:80'
        build: 
            dockerfile: Dockerfile 
            context: .
#            args: 
#                VERSION: 6.0.22
        depends_on: 
            - db
        volumes:
            - ./scripts/config.php:/var/www/html/src/config/config.php

    db:
        image: mariadb:10
        environment: 
            MARIADB_RANDOM_ROOT_PASSWORD: "yes" 
            MARIADB_DATABASE: wacko
            MARIADB_USER: wacko
            MARIADB_PASSWORD: examplepassword
       # volumes:
       #     - ./scripts/wacko.sql:/docker-entrypoint-initdb.d/wacko.sql
            

    phpmyadmin:
        image: phpmyadmin
        restart: always
        ports:
        - 10081:80
%%
|

**Dockerfile**

%%(php)
FROM php:apache
ARG VERSION=6.1.27
ENV MARIADB_DATABASE=wacko

RUN apt-get update -y \
&&  apt-get install -y \
    wget \
    apt-utils \
    libicu-dev \
    zlib1g-dev \
    libpng-dev \
&&     apt-get clean \
&&     rm -rf /var/cache/apt \
&& docker-php-ext-install \
    bcmath \
    gd \
    intl \
    mysqli \
    pdo_mysql \
    pdo \
    mysqli \
    ctype \
    iconv \
&& a2enmod rewrite   

WORKDIR /var/www/html 
USER www-data 
RUN wget -q -O - https://github.com/WackoWiki/wackowiki/archive/refs/tags/${VERSION}.tar.gz | tar -xz --strip-components=1
USER root
RUN sed -i -e  's#/var/www/html#/var/www/html/src#g' /etc/apache2/sites-enabled/000-default.conf

%%
||
||#

https://github.com/jakubboucek/docker-lamp-devstack?tab=readme-ov-file#built-images


**ToDo**
  * security
    * secure linux image
    * nonrootuser