From ffd45634c3004f950c3933e885e076a0716ff175 Mon Sep 17 00:00:00 2001 From: ivasilev Date: Fri, 14 Mar 2025 08:52:56 +0000 Subject: [PATCH] Upgraded the OS level --- Dockerfile | 26 +++++++++++++------------- docker-compose.example.yml | 9 +++++---- public/.gitkeep | 1 + 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 public/.gitkeep diff --git a/Dockerfile b/Dockerfile index 0be1ca3..d07ba64 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM alpine:edge -MAINTAINER Paul Smith +FROM alpine:3.14 +LABEL maintainer="Ivelin Vasilev " # Add repos -RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories +#RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/releases/" >> /etc/apk/repositories # Add basics first -RUN apk update && apk upgrade && apk add \ - bash apache2 php7-apache2 curl ca-certificates openssl openssh git php7 php7-phar php7-json php7-iconv php7-openssl tzdata openntpd nano +RUN apk update && apk upgrade && apk add bash apache2 php7-apache2 curl ca-certificates \ +openssl openssh git php7 php7-phar php7-json php7-iconv php7-openssl tzdata openntpd nano # Add Composer RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -48,14 +48,14 @@ RUN apk add \ php7-fileinfo \ php7-ldap \ php7-apcu - -# Problems installing in above stack +# +## Problems installing in above stack RUN apk add php7-simplexml - +# RUN cp /usr/bin/php7 /usr/bin/php \ && rm -f /var/cache/apk/* - -# Add apache to run and configure +# +## Add apache to run and configure RUN sed -i "s/#LoadModule\ rewrite_module/LoadModule\ rewrite_module/" /etc/apache2/httpd.conf \ && sed -i "s/#LoadModule\ session_module/LoadModule\ session_module/" /etc/apache2/httpd.conf \ && sed -i "s/#LoadModule\ session_cookie_module/LoadModule\ session_cookie_module/" /etc/apache2/httpd.conf \ @@ -64,10 +64,10 @@ RUN sed -i "s/#LoadModule\ rewrite_module/LoadModule\ rewrite_module/" /etc/apac && sed -i "s#^DocumentRoot \".*#DocumentRoot \"/app/public\"#g" /etc/apache2/httpd.conf \ && sed -i "s#/var/www/localhost/htdocs#/app/public#" /etc/apache2/httpd.conf \ && printf "\n\n\tAllowOverride All\n\n" >> /etc/apache2/httpd.conf - +# RUN mkdir /app && mkdir /app/public && chown -R apache:apache /app && chmod -R 755 /app && mkdir bootstrap ADD start.sh /bootstrap/ RUN chmod +x /bootstrap/start.sh - +# EXPOSE 80 -ENTRYPOINT ["/bootstrap/start.sh"] +ENTRYPOINT ["/bootstrap/start.sh"] \ No newline at end of file diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 5eb3f92..a61dbf0 100755 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -1,4 +1,3 @@ -version: "2" services: apache: build: ./ @@ -15,12 +14,14 @@ services: - PHP_XDEBUG_ENABLED=true networks: - default + ports: + - "${PORT_NUMBER:-8989}:80" volumes: - - ./public:/app + - ./public:/app/public cap_add: - SYS_TIME - SYS_NICE + networks: default: - external: - name: docker_docker-localhost + driver: bridge diff --git a/public/.gitkeep b/public/.gitkeep new file mode 100644 index 0000000..2318f33 --- /dev/null +++ b/public/.gitkeep @@ -0,0 +1 @@ +# Кан-Цар keep 7530-03-22