Skip to content

Commit

Permalink
#18 - support fileinfo and pdo_mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
leonstafford committed Jan 8, 2021
1 parent c0aa22e commit 06832ba
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ to launch the Lokl management script to start or manage new WordPress sites.

#### Container Parameters

We default to support ports in range 4000-5000.
I default to support ports in range 4000-5000.

Example run command:

Expand Down Expand Up @@ -134,6 +134,20 @@ And set our sitename to `php8base`, making it easy to rewrite later.

Tail logs on this to know about when it's ready:

```
Currently, output like:
Success: Activated 1 of 1 plugins.
2021/01/08 06:38:26 [notice] 70#70: using the "epoll" event method
2021/01/08 06:38:26 [notice] 70#70: nginx/1.18.0
2021/01/08 06:38:26 [notice] 70#70: OS: Linux 4.19.121-linuxkit
2021/01/08 06:38:26 [notice] 70#70: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/01/08 06:38:26 [notice] 70#70: start worker processes
2021/01/08 06:38:26 [notice] 70#70: start worker process 71
Can force some output to poll for, ie "Lokl php8base container has finished provisioning"
```

`docker logs -f php8base`
`docker logs -f php7base`

Expand All @@ -149,8 +163,10 @@ And there, we should our ready to run image.

#### Running the provisioned image

We want to perform the least amount of processes when a user is running the
container for the first time. We also want to perform these modifications to
[Lokl CLI](https://github.com/lokl-cli) is my client for running an interactive wizard to create and manage Lokl sites. It can be run as an interactive wizard or instantiated with variables to skip the wizard and create a new site with specific details.

I want to perform the least amount of processes when a user is running the
container for the first time. I also want to perform these modifications to
the container only once, including:

- adjusting the env vars for the sitename and port from the base image's
Expand Down
8 changes: 4 additions & 4 deletions php7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ENV TERM="xterm"
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
bash curl less nginx ca-certificates tzdata zip curl \
libmcrypt-dev zlib-dev gmp-dev \
freetype-dev libpng-dev \
php7-fpm php7-json php7-zlib php7-xml php7-phar php7-openssl \
freetype-dev libpng-dev \
php7-fpm php7-json php7-zlib php7-xml php7-phar php7-openssl \
php7-mysqli php7-session \
php7-gd php7-iconv php7-gmp php7-zip php7-fileinfo \
php7-gd php7-iconv php7-gmp php7-zip php7-fileinfo php7-pdo_mysql \
php7-curl php7-opcache php7-ctype php7-ftp php7-tokenizer php7-simplexml \
sudo vim tmux git procps wget sed grep openssh-keygen openssh \
mariadb mariadb-server-utils mysql-client \
Expand All @@ -23,7 +23,7 @@ RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
# TODO: look at using docker-ext or pecl package within apk

# removed
# libjpeg-turbo-dev php7-pdo php7-pdo_mysql
# libjpeg-turbo-dev php7-pdo

RUN sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
sed -i 's/memory_limit = 128M/memory_limit = -1/g' /etc/php7/php.ini && \
Expand Down
6 changes: 3 additions & 3 deletions php8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
bash curl less nginx ca-certificates tzdata zip curl \
libmcrypt-dev zlib-dev gmp-dev \
freetype-dev libpng-dev \
php8-fpm php8-json php8-zlib php8-xml php8-phar php8-openssl \
php8-fpm php8-json php8-zlib php8-xml php8-phar php8-openssl \
php8-mysqli php8-session \
php8-gd php8-iconv php8-gmp php8-zip php8-fileinfo \
php8-gd php8-iconv php8-gmp php8-zip php8-fileinfo php8-pdo_mysql \
php8-curl php8-opcache php8-ctype php8-ftp php8-tokenizer php8-simplexml \
sudo vim tmux git procps wget sed grep openssh-keygen openssh \
mariadb mariadb-server-utils mysql-client \
Expand All @@ -26,7 +26,7 @@ RUN rm /usr/bin/php && \
# NOTE: not found since 7 > 8 upgrade: php8-apcu php8-mcrypt

# removed
# libjpeg-turbo-dev php8-pdo php8-pdo_mysql
# libjpeg-turbo-dev php8-pdo

RUN sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php8/php.ini && \
sed -i 's/memory_limit = 128M/memory_limit = -1/g' /etc/php8/php.ini && \
Expand Down

0 comments on commit 06832ba

Please sign in to comment.