File: Dockerfile

Recommend this page to a friend!
  Classes of Kacper Rowinski  >  PHP MySQL Replication to Kafka Docker  >  Dockerfile  >  Download  
File: Dockerfile
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP MySQL Replication to Kafka Docker
Docker container Move replication events to Kafka
Author: By
Last change:
Date: 8 months ago
Size: 901 bytes
 

Contents

Class file image Download
FROM php:8.0-cli as php-base
WORKDIR /build
RUN apt update && apt install -y \
    libicu-dev \
    librdkafka-dev \
    libzip-dev \
    nano \
    procps \
    && pecl install \
    rdkafka \
    && docker-php-ext-install \
    bcmath \
    intl \
    mysqli \
    pcntl \
    pdo \
    pdo_mysql \
    zip \
    sockets \
    && docker-php-ext-enable \
    rdkafka \
    && apt purge -y $PHPIZE_DEPS \
    && apt autoremove -y --purge \
    && apt clean all

RUN curl -sS https://getcomposer.org/installer | php -- \
  --install-dir=/usr/bin --filename=composer

FROM php-base as php-build
COPY composer.lock composer.json ./

RUN composer install --verbose --ignore-platform-reqs --prefer-dist --no-progress --no-interaction --optimize-autoloader

FROM php-base as php-runtime
WORKDIR /app

COPY . .
COPY --from=php-build /build/vendor/ ./vendor/

CMD [ "php", "bin/application.php", "app:r2k" ]

For more information send a message to info at phpclasses dot org.