From d09c313cda78cfebc4124bcebf076444cd315adc Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Fri, 7 Oct 2022 15:51:20 +0500 Subject: [PATCH] nginx,php --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 8 ++++++++ 2 files changed, 49 insertions(+) diff --git a/Dockerfile b/Dockerfile index e69de29..33f926b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM debian:11-slim +WORKDIR /root + +ARG NEXTCLOUD_VESION=1 +ARG PHPVERSION=8.1 + +#Initial update packges +RUN apt update && apt upgrade + +# Language setup +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +RUN apt install locales -y \ + && apt auto-remove -y \ + && apt clean -y +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ + && locale-gen + +# Installing basic tools +RUN apt install zip unzip git gnupg2 ca-certificates lsb-release apt-transport-https wget curl nano vim -y --no-install-recommends \ + && apt auto-remove -y \ + && apt clean -y + +#Adding Repo and installing PHP +RUN apt update \ + && wget https://packages.sury.org/php/apt.gpg \ + && apt-key add apt.gpg \ + && rm apt.gpg \ + && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php7.list +RUN apt update \ + && bash -c 'apt install -y php${PHPVERSION} php${PHPVERSION}-{fpm,cli,bcmath,bz2,intl,gd,mbstring,mysql,zip,common,dom,curl} --no-install-recommends' + +# Installing nginx +RUN apt update -y \ + && apt install nginx -y --no-install-recommends \ + && apt auto-remove -y \ + && apt clean -y + + +CMD ["bash"] diff --git a/docker-compose.yml b/docker-compose.yml index e69de29..f172d64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3.5' +services: +######################### + app: + build: . + image: git.shihaam.me/dockerfiles/nextcloud + ports: + - 8000:80