Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile for development #945

Open
wants to merge 2 commits into
base: 2.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG PHP_VERSION=8.3 \
COMPOSER_VERSION=latest \
EXTENSION_INSTALLER_VERSION=latest

# At the moment, it's NOT possible to interpolate inside the COPY --from
FROM mlocati/php-extension-installer:${EXTENSION_INSTALLER_VERSION} AS extension-installer
FROM composer:${COMPOSER_VERSION} AS composer
FROM php:${PHP_VERSION}
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY --from=extension-installer --chmod=0755 /usr/bin/install-php-extensions /usr/local/bin/

# https://getcomposer.org/doc/articles/troubleshooting.md#root-package-version-detection
ENV COMPOSER_ROOT_VERSION=2.0.x-dev

ARG USERNAME=FakerPHP \
USER_UID=1000 \
USER_GID=$USER_UID

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME

RUN apt-get update && apt-get install -y \
unzip

RUN install-php-extensions intl

USER $USERNAME
Loading