Skip to content

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioassuncao committed Jun 27, 2024
1 parent 9eab3b3 commit e373235
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 125 deletions.
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ x-function: &common_setup
build:
context: .
dockerfile: ./docker/Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
restart: always
depends_on:
- mysql
Expand Down
64 changes: 1 addition & 63 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,59 +1,4 @@
FROM alpine:latest

WORKDIR /var/www/html

# Essentials
RUN echo "UTC" > /etc/timezone && \
apk add --no-cache zip unzip curl sqlite bash && \
sed -i 's/bin\/ash/bin\/bash/g' /etc/passwd

# Installing PHP and extensions
RUN apk add --no-cache php83 \
php83-common \
php83-gd \
php83-pdo \
php83-opcache \
php83-zip \
php83-phar \
php83-iconv \
php83-cli \
php83-curl \
php83-openssl \
php83-mbstring \
php83-tokenizer \
php83-fileinfo \
php83-json \
php83-xml \
php83-xmlwriter \
php83-xmlreader \
php83-simplexml \
php83-dom \
php83-pdo_mysql \
php83-pdo_sqlite \
php83-pecl-redis \
php83-intl \
php83-exif \
php83-pcntl \
php83-sockets \
php83-posix \
php83-dev \
php83-pear \
gcc \
make \
autoconf \
musl-dev

# Install excimer via pecl
RUN pecl install excimer && echo "extension=excimer.so" > /etc/php83/conf.d/50_excimer.ini

# Remove build dependencies
RUN apk del gcc make autoconf musl-dev php83-dev

# PHP Configuration
COPY ./docker/php/custom.ini /etc/php83/conf.d/custom.ini

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
FROM ghcr.io/fabioassuncao/php:8.3

# Download and set up FrankenPHP
ADD https://github.com/dunglas/frankenphp/releases/latest/download/frankenphp-linux-x86_64 /usr/local/bin/frankenphp
Expand All @@ -63,10 +8,3 @@ RUN chmod +x /usr/local/bin/frankenphp
COPY . /var/www/html
RUN composer install && \
chown -R nobody:nobody /var/www/html/storage

COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint

EXPOSE 8000

ENTRYPOINT ["/usr/local/bin/entrypoint"]
56 changes: 0 additions & 56 deletions docker/entrypoint.sh

This file was deleted.

4 changes: 0 additions & 4 deletions docker/php/custom.ini

This file was deleted.

0 comments on commit e373235

Please sign in to comment.