diff --git a/.docker/runtime/Dockerfile b/.docker/runtime/Dockerfile new file mode 100644 index 0000000..e1c83cd --- /dev/null +++ b/.docker/runtime/Dockerfile @@ -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 diff --git a/.docker/runtime/docker-compose.yml b/.docker/runtime/docker-compose.yml new file mode 100644 index 0000000..ca3ae0a --- /dev/null +++ b/.docker/runtime/docker-compose.yml @@ -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 + diff --git a/composer.json b/composer.json index b851a18..5742528 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/composer.lock b/composer.lock index a0a3b5b..aac0ef5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "57d1c979e3eefb0bba24687f6eaacf9b", + "content-hash": "b8c6baf32f2df051b29190aa9380a597", "packages": [ { "name": "beberlei/assert", @@ -1137,16 +1137,16 @@ }, { "name": "php-school/php-workshop", - "version": "dev-master", + "version": "dev-cloud-runtime", "source": { "type": "git", "url": "https://github.com/php-school/php-workshop.git", - "reference": "426548cd33cae97e0eddbd561ea0a01f5d64104d" + "reference": "b32e63aabbba9606cacb3173e31df61dea56d136" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-school/php-workshop/zipball/426548cd33cae97e0eddbd561ea0a01f5d64104d", - "reference": "426548cd33cae97e0eddbd561ea0a01f5d64104d", + "url": "https://api.github.com/repos/php-school/php-workshop/zipball/b32e63aabbba9606cacb3173e31df61dea56d136", + "reference": "b32e63aabbba9606cacb3173e31df61dea56d136", "shasum": "" }, "require": { @@ -1176,7 +1176,6 @@ "squizlabs/php_codesniffer": "^3.7", "yoast/phpunit-polyfills": "^0.2.0" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -1215,9 +1214,9 @@ ], "support": { "issues": "https://github.com/php-school/php-workshop/issues", - "source": "https://github.com/php-school/php-workshop/tree/master" + "source": "https://github.com/php-school/php-workshop/tree/cloud-runtime" }, - "time": "2023-02-02T07:53:25+00:00" + "time": "2023-10-14T14:42:56+00:00" }, { "name": "php-school/terminal",