Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Attempt to fix codespaces dev image by installing bcmath
Browse files Browse the repository at this point in the history
  • Loading branch information
amcintosh committed Oct 25, 2023
1 parent 86531d5 commit 58c7c18
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG VARIANT=8.2-apache-bookworm
FROM php:${VARIANT}

# Install xdebug
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request = yes" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.client_port = 9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& rm -rf /tmp/pear

# Install composer
RUN curl -sSL https://getcomposer.org/installer | php \
&& chmod +x composer.phar \
&& mv composer.phar /usr/local/bin/composer

# "spryker/decimal-object" needs bcmath
RUN docker-php-ext-install bcmath

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
8 changes: 6 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{
"name": "PHP",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/php:1-8.2-bookworm",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand All @@ -13,7 +16,8 @@

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080
8080,
9000
],
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
Expand Down

0 comments on commit 58c7c18

Please sign in to comment.