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

Cloud runtime #116

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
13 changes: 13 additions & 0 deletions .docker/runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM php:8.2-alpine as build

RUN apk add --no-cache $PHPIZE_DEPS && \
apk add --no-cache linux-headers

RUN docker-php-ext-install sockets

FROM php:8.2-alpine as final

COPY --from=build /usr/local/lib/php /usr/local/lib/php
COPY --from=build /usr/local/etc/php /usr/local/etc/php

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
21 changes: 21 additions & 0 deletions .docker/runtime/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.8'

services:
runtime:
image: learn-you-php-runtime
build:
context: .
dockerfile: Dockerfile
volumes:
- type: bind
source: ${SOLUTION}
target: '/solution'
networks:
- runtime
cap_drop:
- ALL

networks:
runtime:
internal: true

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"require" : {
"php" : ">=7.3",
"ext-pdo_sqlite": "*",
"php-school/php-workshop": "dev-master",
"php-school/php-workshop": "dev-cloud-runtime",
"ext-sockets": "*"
},
"require-dev": {
Expand Down
15 changes: 7 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.