Skip to content

Some updates regarding dns and extensions for php images #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ services:
tty: true
networks:
- your_project_network
dns:
- 8.8.8.8
- 1.1.1.1

# PHP-FPM
php-fpm:
Expand Down
20 changes: 9 additions & 11 deletions env/docker/php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

# Install Laravel required extensions
RUN docker-php-ext-install json && \
docker-php-ext-install mbstring && \
docker-php-ext-install xml && \
docker-php-ext-install ctype && \
docker-php-ext-install tokenizer && \
docker-php-ext-install pdo_pgsql && \
docker-php-ext-install opcache && \
docker-php-ext-install zip && \
docker-php-ext-configure intl && docker-php-ext-install intl && \
docker-php-ext-install bcmath && \
docker-php-ext-install sockets
RUN docker-php-ext-install \
mbstring \
pdo_pgsql \
opcache \
zip \
bcmath \
sockets \
intl \
pcntl

# Install required PECL extensions
RUN pecl install \
Expand Down
26 changes: 12 additions & 14 deletions env/docker/workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ ARG PHP_VERSION=${PHP_VERSION}

FROM php:${PHP_VERSION}-cli

RUN echo "nameserver 8.8.8.8" >> /etc/resolv.conf

# Install packages for required extensions
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -19,26 +17,26 @@ RUN apt-get update \
unzip \
libzip-dev \
vim \
nano \
wget \
zsh \
gpg \
lsb-release \
ssh-client \
iputils-ping \
libonig-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*

# Install Laravel required extensions
RUN docker-php-ext-install json && \
docker-php-ext-install mbstring && \
docker-php-ext-install xml && \
docker-php-ext-install ctype && \
docker-php-ext-install tokenizer && \
docker-php-ext-install pdo_pgsql && \
docker-php-ext-install opcache && \
docker-php-ext-install zip && \
docker-php-ext-configure intl && docker-php-ext-install intl && \
docker-php-ext-install bcmath && \
docker-php-ext-install sockets
RUN docker-php-ext-install \
mbstring \
pdo_pgsql \
opcache \
zip \
bcmath \
sockets \
intl \
pcntl

# Install required PECL extensions
RUN pecl install \
Expand Down