Skip to content

Commit 147501a

Browse files
committed
Add Dockerfile for PHP 8.2
1 parent f7a761e commit 147501a

3 files changed

Lines changed: 39 additions & 1 deletion

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM --platform=linux/amd64 php:8.2-apache
2+
RUN apt-get update && apt-get install -y --no-install-recommends \
3+
git \
4+
iputils-ping \
5+
libldap2-dev \
6+
libpng-dev \
7+
libpq-dev \
8+
libsqlite3-dev \
9+
libzip-dev \
10+
mariadb-client \
11+
postgresql-client \
12+
sqlite3 \
13+
sudo \
14+
unzip \
15+
vim \
16+
&& apt-get -y clean \
17+
&& rm -rf /var/lib/apt/lists/*
18+
RUN docker-php-ext-install bcmath zip pdo pdo_mysql pdo_pgsql pdo_sqlite exif gd ldap
19+
COPY composer.json /composer.json
20+
COPY composer.lock /composer.lock
21+
COPY src /src
22+
COPY test /test
23+
RUN curl -sS https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/composer; chmod +x /usr/local/bin/composer
24+
RUN cd / && composer update
25+
#RUN composer test

.github/workflows/php.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,26 @@ on:
66
- "*"
77

88
jobs:
9+
test-with-php82:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: docker-compose-run
14+
shell: bash
15+
run: |
16+
cp .github/workflows/Dockerfile-for-php-8.2 Dockerfile
17+
docker-compose up -d
18+
sleep 60
19+
docker-compose exec -T web sh -c "cd / && composer test"
20+
921
test-with-php81:
1022
runs-on: ubuntu-latest
1123
steps:
1224
- uses: actions/checkout@v2
1325
- name: docker-compose-run
1426
shell: bash
1527
run: |
28+
cp .github/workflows/Dockerfile-for-php-8.1 Dockerfile
1629
docker-compose up -d
1730
sleep 60
1831
docker-compose exec -T web sh -c "cd / && composer test"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 php:8.1-apache
1+
FROM --platform=linux/amd64 php:8.2-apache
22
RUN apt-get update && apt-get install -y --no-install-recommends \
33
git \
44
iputils-ping \

0 commit comments

Comments
 (0)