Hello, I am new to Kirby! I am trying to follow the plainkit tutorial from this playlist: https://www.youtube.com/playlist?list=PLTep5U-3mg9EfgnQ08XDRs4vSOmhw2JWz on my Mac using Docker with no success! =(
I have found some Docker images / containers inside github but most of them are 2, 3 years long. The closest I got was using: GitHub - severinlx/getKirbyDocker: dockerfile for getkirby, php:7.4-apache, composer
What do I want
- Have my kirby files in my local machine: eg.:
./public/... - Run a
docker-compose upand have a container with all required libs running inside the container and exposed on myhttp://localhost:3001 - All the changes made inside my
./publicfiles to reflect inside the container / browser
My Dockerfile:
## Bootstrap from PHP container
FROM php:7.4-apache
## Setting up default workdir
WORKDIR "/var/www/html"
## Add PHP Core Extensions, like GD Library, iconv, MySQLI, Gettext
RUN apt-get update -qq && apt-get upgrade -y
RUN apt-get install -y unzip
RUN apt-get install -y libfreetype6-dev
RUN apt-get install -y libjpeg62-turbo-dev
RUN apt-get install -y libmcrypt-dev
RUN apt-get install -y libpng-dev
RUN apt-get install -y zlib1g-dev
RUN apt-get install -y libxml2-dev
RUN apt-get install -y libzip-dev
RUN apt-get install -y libonig-dev
RUN apt-get install -y graphvi
RUN docker-php-ext-install mbstring \
&& docker-php-ext-configure gd \
&& docker-php-ext-install -j$(nproc) gd
#&& docker-php-ext-install ctype
#&& docker-php-ext-install curl
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#kirby
# RUN composer create-project getkirby/plainkit myKirby
# RUN cp -R myKirby/. .
# RUN rm -r myKirby
#remove this, why?
RUN rm -rf /var/lib/apt/lists/*
## Enable modrewrite and SSL module
RUN a2enmod rewrite
RUN a2enmod ssl
After build the container, I am running:
docker run -p 3001:80 -v /$(pwd)/public:/var/www/html:rw -d 8a0c6b0c7fbc
It is “almost” working
I can access the url: http://localhost:3001on my browser, I see the “Home” title.
If I change the file ./public/content/home/home.txtand reload the browser, I see the changes! Same thing with the../public/site/templates/default.php
If I create a new file / folder such as ./public/content/projects/projects.txtand try to reach it on the browser (http://localhost:3001/projects) I get aError 404
If I try to reach the panel it on the browser (http://localhost:3001/panel) I get aError 404
Something is not working …
Does anyone have a Docker solution for the Kirby 3.5 / plainkit?