version: "3.7"
services:
caddy:
container_name: caddy
image: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- /docker/caddy/data:/data
- /docker/caddy/config:/config
- /docker/caddy/log:/var/log
- /docker/caddy/www:/var/www/html
php:
container_name: php
build:
dockerfile: /docker/php/dockerfile
restart: unless-stopped
volumes:
- /docker/caddy/www:/var/www/html
- /docker/php/log/php-fpm.log:/usr/local/var/log/php-fpm.log
- /docker/php/php-fpm.d:/usr/local/etc/php-fpm.d
- /docker/php/log/www/access.log:/usr/local/log/www/access.log
# php7.4-fpm 이미지 사용
FROM php:7.4-fpm
# 기본적인 라이브러리 설치
RUN apt-get update && apt-get install -y \
libzip \
&& docker-php-ext-install pdo_mysql json opcache \
intl \
curl \
readline \
xml \
zip
# composer 설치
#RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
[DevOps] docker build시 "failed to solve with frontend dockerfile.v0: failed to read dockerfile ..." 오류
2022. 7. 2. 00:40
docker 빌드시 아래와 같은 에러 발생 할경우가 있을 수 있습니다.
docker build -t test .
failed to solve with frontend dockerfile.v0: failed to read dockerfile ...
해결 방법은 간단한데요 위 에러는 dockerfile경로를 찾지 못해서 발생하게 됩니다. 따라서 dockerfile 경로를 확인해서 잘 넣어주어야 합니다.
docker bild -t test -f ./Dockerfile .