Skip to content

Commit

Permalink
Merge pull request #408 from php-vcr/405-adding-php-83-development-wo…
Browse files Browse the repository at this point in the history
…rkspace-docker-image

FEATURE: Added php 8.3 workspace docker image
  • Loading branch information
higidi committed Feb 23, 2024
2 parents eb21dc6 + 99c85db commit 2a6220d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yaml
Expand Up @@ -30,3 +30,13 @@ services:
volumes:
- .:/var/www/html
- ~/.composer:/home/user/.composer
workspace83:
tty: true
build:
context: resources/docker/workspace/8.3
args:
PUID: "${PUID:-1000}"
PGID: "${PGID:-1000}"
volumes:
- .:/var/www/html
- ~/.composer:/home/user/.composer
40 changes: 40 additions & 0 deletions resources/docker/workspace/8.3/Dockerfile
@@ -0,0 +1,40 @@
FROM php:8.3-cli-alpine

ARG PUID=1000
ARG PGID=1000

RUN apk add --no-cache --virtual .build-deps \
# for extensions
$PHPIZE_DEPS \
# for soap
libxml2-dev \
# for xdebug \
linux-headers \
&& \
apk add --no-cache \
bash \
# for soap
libxml2 \
# for composer
unzip \
&& \
docker-php-ext-install soap \
&& \
pecl install \
# pcov for coverage runs
pcov && docker-php-ext-enable pcov \
&& \
# for debugging
pecl install xdebug && docker-php-ext-enable xdebug \
&& \
apk del .build-deps

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /var/www/html

# Add a non-root user to prevent files being created with root permissions on host machine.
RUN addgroup -g ${PGID} user && \
adduser -u ${PUID} -G user -D user

USER user

0 comments on commit 2a6220d

Please sign in to comment.