Skip to content

Latest commit

 

History

History
154 lines (120 loc) · 5.87 KB

README.md

File metadata and controls

154 lines (120 loc) · 5.87 KB

Docker

Docker image configured for roadrunner in production use.

Docker images

Simple image with PHP, RoadRunner and pre-installed extensions:

  • spacetabio/roadrunner-alpine:8.0-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.1-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.2-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)

With xdebug:

  • spacetabio/roadrunner-alpine:8.0-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.1-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.2-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)

Basic usage

Roadrunner:

FROM spacetabio/roadrunner-alpine:8.1-base-1.11.0

COPY . /app

# rr is pre installed but config should be provided by application. 
CMD ["rr", "serve", "-c", ".rr.yaml"]

Extensions

As default php-extensions are pre-installed:

  • opcache
  • pnctl
  • yaml
  • intl
  • sockets
  • gd
  • exif
  • zip
  • bcmath
  • grpc
  • event

Configure

You can configure php.ini options thought changing following env variables in your Dockerfile:

ENV PHP_MEMORY_LIMIT=-1
ENV PHP_MAX_EXECUTION_TIME=0
ENV PHP_MAX_INPUT_TIME=60
ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT"
ENV PHP_DISPLAY_ERRORS=Off
ENV PHP_POST_MAX_SIZE=512M
ENV PHP_UPLOAD_MAX_FILESIZE=512M
ENV PHP_MAX_FILE_UPLOADS=20
ENV PHP_DEFAULT_MIMETYPE=application/json
ENV PHP_SESSION_STRICT_MODE=1
ENV PHP_SESSION_COOKIE_SECURE=1
ENV PHP_EXPOSE_PHP=Off
ENV PHP_DATE_TIMEZONE=UTC
ENV PHP_SHORT_OPEN_TAG=Off

ENV PHP_FFI_ENABLE=false
ENV PHP_FFI_PRELOAD=''
ENV PHP_OPCACHE_ENABLE=1
ENV PHP_OPCACHE_ENABLE_CLI=1
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=512
ENV PHP_OPCACHE_INTERNED_STRINGS_BUFFER=16
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES_AUTO=true
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES=50000
ENV PHP_OPCACHE_REVALIDATE_FREQ=0
ENV PHP_OPCACHE_ENABLE_FILE_OVERRIDE=1
ENV PHP_OPCACHE_FILE_CACHE_ONLY=1

Version

Format: {phpVersion}-{imageType}-{semverImageVersion}

Map:

  • Image tag *-1.11.* contains RoadRunner 2023.1.1
  • Image tag *-1.10.* contains RoadRunner 2.12.2
  • Image tag *-1.9.* contains RoadRunner 2.11.4
  • Image tag *-1.8.* contains RoadRunner 2.7.3 and Spiral binary (in separate images).
  • Image tag *-1.7.* contains RoadRunner 2.5.6 and Spiral binary (in separate images).
  • Image tag *-1.6.* contains RoadRunner 2.4.2 and Spiral binary (in separate images).
  • Image tag *-1.5.* contains RoadRunner 2.3.3 and Spiral binary (in separate images).
  • Image tag *-1.4.* contains RoadRunner 2.3.3 and Spiral binary (in separate images).
  • Image tag *-1.3.* contains RoadRunner 2.3.3.
  • Image tag *-1.2.* contains RoadRunner 1.8.1.
  • Image tag *-1.1.* contains RoadRunner 1.9.0.
  • Image tag *-1.0.0 contains RoadRunner 1.9.0.

Build and push to docker hub

Shell bin/bash is required.

# make PUSH=true VERSION=latest base74
# make PUSH=true VERSION=latest base80
# make PUSH=true VERSION=latest base81
make PUSH=true VERSION=latest base82

Changelog

License

The MIT License

Copyright © 2023 spacetab.io, Inc. https://spacetab.io

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.