Skip to content

Commit 2a6220d

Browse files
authored
Merge pull request php-vcr#408 from php-vcr/405-adding-php-83-development-workspace-docker-image
FEATURE: Added php 8.3 workspace docker image
2 parents eb21dc6 + 99c85db commit 2a6220d

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

docker-compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,13 @@ services:
3030
volumes:
3131
- .:/var/www/html
3232
- ~/.composer:/home/user/.composer
33+
workspace83:
34+
tty: true
35+
build:
36+
context: resources/docker/workspace/8.3
37+
args:
38+
PUID: "${PUID:-1000}"
39+
PGID: "${PGID:-1000}"
40+
volumes:
41+
- .:/var/www/html
42+
- ~/.composer:/home/user/.composer
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM php:8.3-cli-alpine
2+
3+
ARG PUID=1000
4+
ARG PGID=1000
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
# for extensions
8+
$PHPIZE_DEPS \
9+
# for soap
10+
libxml2-dev \
11+
# for xdebug \
12+
linux-headers \
13+
&& \
14+
apk add --no-cache \
15+
bash \
16+
# for soap
17+
libxml2 \
18+
# for composer
19+
unzip \
20+
&& \
21+
docker-php-ext-install soap \
22+
&& \
23+
pecl install \
24+
# pcov for coverage runs
25+
pcov && docker-php-ext-enable pcov \
26+
&& \
27+
# for debugging
28+
pecl install xdebug && docker-php-ext-enable xdebug \
29+
&& \
30+
apk del .build-deps
31+
32+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
33+
34+
WORKDIR /var/www/html
35+
36+
# Add a non-root user to prevent files being created with root permissions on host machine.
37+
RUN addgroup -g ${PGID} user && \
38+
adduser -u ${PUID} -G user -D user
39+
40+
USER user

0 commit comments

Comments
 (0)