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 docker (min) #163

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG PHP_VERSION=8.2.7

FROM php:${PHP_VERSION}

ENV DEBIAN_FRONTEND noninteractive
ENV DOCKER_PHP_DEPS \
libxml2-dev \
libzip-dev \
unzip

RUN set -xe; \
apt-get --allow-releaseinfo-change update && \
apt-get install -y -qq ${DOCKER_PHP_DEPS} --no-install-suggests --no-install-recommends && \
docker-php-ext-install -j$(nproc) xml && \
docker-php-ext-install -j$(nproc) zip && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean

WORKDIR /app

COPY ./ ./
8 changes: 8 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
php-fpm:
build:
context: ./
dockerfile: ./Dockerfile
entrypoint: [ '/app/docker-entrypoint.sh' ]
volumes:
- .:/app
10 changes: 10 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

echo "Start PHP image"

# Define of php path
PHP_FPM=$(which php-fpm)

${PHP_FPM} --nodaemonize
27 changes: 27 additions & 0 deletions local_development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Local Development

You can use Docker as alternative for the locally installed tools.
There is a [Dockerfile](Dockerfile) provided for the calling of shell scripts.

**Pre conditions:**
- Docker should be installed.
- You familiar and can to call shell scripts.

First of all, you have to build container locally.

```shell
docker build -t phario:local .
```

The next step. Run container.

```shell
docker run -ti phario:local bash
```

## Updating of Repositories List

1. Provide an alias of your project when it's composer name don't match pattern `<user-name-on-github>/<repository-name>`.
Add it into file of [repository](data/repositories.xml).
2. It should be added it alphabetical order. So, you can just add it in any place
and then call [script](scripts/order-repos/order) which order repositories for you.