Skip to content

Commit 7b5bc3c

Browse files
committed
Update docker
1 parent 28bd665 commit 7b5bc3c

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

Dockerfile

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
FROM php:8.3-apache
1+
FROM php:8.4-apache
22

3-
RUN apt update && apt install -y git
4-
5-
RUN pecl install redis && docker-php-ext-enable redis
6-
7-
RUN apt install -y libz-dev libssl-dev libmemcached-dev && pecl install memcached && docker-php-ext-enable memcached
8-
9-
RUN docker-php-ext-enable opcache
10-
11-
RUN pecl install apcu && docker-php-ext-enable apcu
12-
13-
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
3+
RUN apt-get update && apt-get install -y \
4+
&& pecl install redis apcu \
5+
&& docker-php-ext-enable redis apcu opcache \
6+
&& rm -rf /var/lib/apt/lists/*
147

158
WORKDIR /var/www/html
16-
RUN chmod 777 /var/www/html
179

18-
RUN git clone --depth=1 https://github.com/RobiNN1/phpCacheAdmin.git .
19-
RUN rm -r .git tests composer.json package.json phpstan.neon phpunit.xml README.md tailwind.config.js docker-compose.yml Dockerfile
20-
RUN apt remove git -y && apt autoremove -y && apt clean
10+
RUN rm -rf tests composer.json package.json phpstan.neon phpunit.xml README.md tailwind.config.js docker-compose.yml Dockerfile
11+
12+
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
2113

22-
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf # fix for apache
14+
RUN chown -R www-data:www-data /var/www/html
2315

24-
CMD apache2-foreground
16+
CMD ["apache2-foreground"]

docker-compose.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
version: '3'
21
services:
32
phpcacheadmin:
43
build: .
54
ports:
65
- "8080:80"
7-
#volumes:
8-
# If you want to use config.php instead of ENV variables
9-
# - "./config.php:/var/www/html/config.php"
6+
volumes:
7+
- "./:/var/www/html/"
108
environment:
119
- PCA_REDIS_0_HOST=redis
1210
- PCA_REDIS_0_PORT=6379

0 commit comments

Comments
 (0)