Skip to content

Commit 788ca4c

Browse files
committed
add dev env for docker
1 parent dbd918f commit 788ca4c

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM php:8.2-apache
2+
RUN docker-php-ext-install mysqli
3+
RUN docker-php-ext-enable mysqli
4+
RUN apt-get update
5+
RUN apt-get install libzip-dev -y
6+
RUN docker-php-ext-install zip
7+
RUN docker-php-ext-enable zip
8+
RUN a2enmod rewrite
9+
RUN touch /usr/local/etc/php/conf.d/ssp.ini
10+
RUN echo "output_buffering = 16384" >> /usr/local/etc/php/conf.d/ssp.ini
11+
RUN echo "display_errors = off" >> /usr/local/etc/php/conf.d/ssp.ini
12+
RUN echo "error_reporting = E_ERROR" >> /usr/local/etc/php/conf.d/ssp.ini
13+
RUN apt install git -y
14+
WORKDIR /var/www/html
15+
RUN docker-php-ext-install gettext
16+
RUN docker-php-ext-install pdo_mysql
17+
RUN apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install -j$(nproc) gd
18+
RUN apt-get install -y locales
19+
RUN locale-gen en_GB.UTF-8
20+
RUN sed -i '/en_GB.UTF-8/s/^# //g' /etc/locale.gen && \
21+
locale-gen

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: '3'
2+
3+
networks:
4+
status-db:
5+
6+
services:
7+
server-status:
8+
build: .
9+
volumes:
10+
- ./:/var/www/html
11+
ports:
12+
- 4000:80
13+
networks:
14+
- status-db
15+
dbserver:
16+
image: mysql
17+
command: --default-authentication-plugin=mysql_native_password
18+
environment:
19+
MYSQL_ROOT_PASSWORD: e347h43cve89
20+
MYSQL_DATABASE: server_status
21+
volumes:
22+
- ./database:/var/lib/mysql
23+
networks:
24+
- status-db

0 commit comments

Comments
 (0)