Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 60b6116

Browse files
committed
Initial commit
1 parent 345418b commit 60b6116

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Dockerfile-*
2+
Makefile

Dockerfile-7

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG BASE_IMAGE_TAG=7.2
2+
3+
FROM php:${BASE_IMAGE_TAG}-apache
4+
5+
# install composer
6+
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer1
7+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer2
8+
WORKDIR /usr/bin
9+
RUN ln -s /usr/bin/composer2 /usr/bin/composer
10+
11+
# install libraries and utilities and extensions
12+
RUN apt-get update \
13+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
14+
git \
15+
libicu-dev \
16+
libpq-dev \
17+
libsqlite3-dev \
18+
mariadb-client \
19+
sqlite3 \
20+
unzip \
21+
vim \
22+
&& apt-get clean \
23+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
24+
&& rm -rf /var/lib/apt/lists/* \
25+
&& docker-php-ext-install -j$(nproc) \
26+
intl \
27+
pdo_mysql \
28+
pdo_pgsql \
29+
pdo_sqlite

Dockerfile-8

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG BASE_IMAGE_TAG=8.0
2+
3+
FROM php:${BASE_IMAGE_TAG}-apache
4+
5+
# install composer
6+
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer1
7+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer2
8+
WORKDIR /usr/bin
9+
RUN ln -s /usr/bin/composer2 /usr/bin/composer
10+
11+
# install libraries and utilities and extensions
12+
RUN apt-get update \
13+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
14+
git \
15+
libicu-dev \
16+
libpq-dev \
17+
libsqlite3-dev \
18+
mariadb-client \
19+
sqlite3 \
20+
unzip \
21+
vim \
22+
&& apt-get clean \
23+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
24+
&& rm -rf /var/lib/apt/lists/* \
25+
&& docker-php-ext-install -j$(nproc) \
26+
intl \
27+
pdo_mysql \
28+
pdo_pgsql \
29+
pdo_sqlite

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
all: 7 8
2+
3+
7: 7.2 7.3 7.4
4+
5+
8: 8.0 8.1 8.2
6+
7+
7.2 7.3 7.4: Dockerfile-7
8+
docker build --build-arg="BASE_IMAGE_TAG=$@" -t goclearsky/php-apache-dev:$@ -f Dockerfile-7 .
9+
10+
8.0 8.1 8.2: Dockerfile-8
11+
docker build --build-arg="BASE_IMAGE_TAG=$@" -t goclearsky/php-apache-dev:$@ -f Dockerfile-8 .

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PHP Apache Dev
2+
3+
Includes both composer v1 and v2, various database pdo's, and other elements required for general dev and test.
4+
5+
# Makefile
6+
7+
```
8+
make <version>
9+
```
10+
11+
* Versions
12+
* 7.2, 7.3, 7.4
13+
* 8.0, 8.1, 8.2

0 commit comments

Comments
 (0)