Skip to content

Commit 7d97b14

Browse files
committed
switch to apache base image
1 parent d7b7cc8 commit 7d97b14

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docker/Dockerfile

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
1-
FROM drupal:11-apache
1+
FROM php:8.3-apache
22

3-
# Install sqlite3 CLI
4-
RUN apt-get update && apt-get install -y sqlite3
3+
# Install system dependencies
4+
RUN apt-get update && apt-get install -y \
5+
sqlite3 \
6+
libsqlite3-dev \
7+
unzip \
8+
git \
9+
&& docker-php-ext-install pdo pdo_sqlite apcu
510

6-
# Copy only what's required to run the config-tool
11+
# Set working directory
12+
WORKDIR /var/www
13+
14+
# Copy application files
715
COPY web/ web/
816
COPY vendor/ vendor/
917
COPY docker/entrypoint.sh /entrypoint.sh
1018

19+
# Set permissions
1120
RUN chmod +x /entrypoint.sh \
12-
&& chown -R www-data:www-data /var/www \
13-
&& ln -sf /var/www/web /var/www/html
21+
&& chown -R www-data:www-data /var/www
22+
23+
# Create symlink: html -> web
24+
RUN ln -sf /var/www/web /var/www/html
1425

26+
# Set working directory inside the container to the webroot
1527
WORKDIR /var/www/html
1628

29+
# Set environment variable to detect Docker
1730
ENV DRUPAL_DOCKER=1
1831

32+
# Set entrypoint
1933
ENTRYPOINT ["/entrypoint.sh"]
2034

2135
EXPOSE 80

0 commit comments

Comments
 (0)