-
-
Save mateusjunges/6525b1dd70df8d061ef6282b9c07d1a6 to your computer and use it in GitHub Desktop.
Dockerfile for laravel kafka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG PHP_VERSION | |
FROM php:${PHP_VERSION}-fpm-alpine | |
ARG LIBRDKAFKA_VERSION | |
ARG EXT_RDKAFKA_VERSION | |
ARG LARAVEL_VERSION | |
RUN apk update && \ | |
apk add git zlib-dev libressl-dev libsasl zstd-dev build-base && \ | |
git config --global advice.detachedHead false && \ | |
apk add bash | |
RUN git clone --branch ${LIBRDKAFKA_VERSION} https://github.com/edenhill/librdkafka.git && \ | |
cd librdkafka && \ | |
./configure --install-deps && \ | |
make && \ | |
make install | |
RUN apk update && \ | |
apk add autoconf && \ | |
pecl install rdkafka-${EXT_RDKAFKA_VERSION} | |
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer | |
RUN composer global require laravel/installer | |
WORKDIR /application | |
RUN cd /application && \ | |
composer create-project --prefer-dist laravel/laravel laravel-test "${LARAVEL_VERSION}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment