diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6ee41ac --- /dev/null +++ b/.drone.yml @@ -0,0 +1,32 @@ +kind: pipeline +type: docker +name: build + +steps: + - name: build_php_base + image: plugins/docker + settings: + dockerfile: docker/php/Dockerfile + registry: localhost + repo: arbitry_php_base + dry_run: true + insecure: true + build_args: + PHP_VERSION: 7.4.4 + + - name: build_php_fpm + image: plugins/docker + settings: + dockerfile: docker/php-fpm/Dockerfile + registry: localhost + repo: arbitry_php_fpm + dry_run: true + insecure: true + build_args: + PHP_VERSION: 7.4.4 + BUILD_IMAGE: arbitry_php_base + depends_on: + - build_php_base + trigger: + status: + - success \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e69de29 diff --git a/docker/php-fpm/Dockerfile b/docker/php-fpm/Dockerfile new file mode 100644 index 0000000..d07e625 --- /dev/null +++ b/docker/php-fpm/Dockerfile @@ -0,0 +1,5 @@ +ARG PHP_VERSION=7.4.4 +ARG BUILD_IMAGE + +FROM php:$PHP_VERSION-fpm-alpine +FROM $BUILD_IMAGE:latest as build \ No newline at end of file diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 0000000..5f92716 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,14 @@ +ARG PHP_VERSION=7.4.4 +FROM php:$PHP_VERSION-alpine + +RUN echo "date.timezone = UTC" > /usr/local/etc/php/conf.d/etc.ini +ENV TERM xterm + +RUN apk add --update --no-cache \ +libcurl \ +bash \ +curl + +RUN docker-php-ext-install bcmath + +COPY ./project /projects/main diff --git a/project/test.php b/project/test.php new file mode 100644 index 0000000..c0e6fe0 --- /dev/null +++ b/project/test.php @@ -0,0 +1,5 @@ +