Following Docker images are available:
Description | Links | Status |
---|---|---|
Official RR image | Link | |
Third party image from n1215 |
Link | |
Third party image from spacetab-io |
Link |
Here is an example of a Dockerfile
that can be used to build a Docker image with RoadRunner for a PHP application:
FROM php:8.2-cli-alpine3.17 as backend
RUN --mount=type=bind,from=mlocati/php-extension-installer:1.5,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
install-php-extensions opcache zip xsl dom exif intl pcntl bcmath sockets && \
apk del --no-cache ${PHPIZE_DEPS} ${BUILD_DEPENDS}
WORKDIR /app
ENV COMPOSER_ALLOW_SUPERUSER=1
COPY --from=composer:2.3 /usr/bin/composer /usr/bin/composer
# Copy composer files from app directory to install dependencies
COPY ./app/composer.* .
RUN composer install --optimize-autoloader --no-dev
COPY --from=ghcr.io/roadrunner-server/roadrunner:2023.1.1 /usr/bin/rr /app
EXPOSE 8080/tcp
# Copy application files
COPY ./app .
# Run RoadRunner server
CMD ./rr serve -c .rr.yaml