Add Dockerfile
This commit is contained in:
parent
3486c6dcc3
commit
4981498fcb
1 changed files with 16 additions and 0 deletions
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM php:8.2-apache
|
||||
|
||||
# 1. PostgreSQL 연결에 필요한 필수 시스템 라이브러리 및 PHP 드라이버 설치
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
&& docker-php-ext-install pdo pdo_pgsql pgsql \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 2. 소스코드 전체를 Apache 웹서버 경로로 복사
|
||||
COPY . /var/www/html/
|
||||
|
||||
# 3. Apache가 폴더를 정상 읽고 쓸 수 있게 권한 조정
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
# Apache HTTP 기본 포트 노출
|
||||
EXPOSE 80
|
||||
Loading…
Reference in a new issue