-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (37 loc) · 1007 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM php:8.2-cli-alpine3.17
RUN mkdir -p /var/www/html
RUN mkdir -p /var/www/html/databasestore
WORKDIR /var/www/html
RUN apk add --no-cache \
bash \
gnupg \
libzip-dev \
unzip \
zip \
icu-dev \
icu-libs \
jpegoptim \
optipng \
pngquant \
gifsicle \
libpng-dev \
libjpeg-turbo-dev \
tzdata \
unzip \
zip
# Install Composer manually
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
# Install Node and NPM manually
COPY --from=node:20-alpine /usr/local/bin /usr/local/bin
COPY --from=node:20-alpine /usr/local/lib/node_modules /usr/local/lib/node_modules
# Install PHP extensions
RUN docker-php-ext-configure gd --enable-gd --with-jpeg
RUN docker-php-ext-install pdo_mysql bcmath intl exif gd zip
ENV TZ=Europe/Berlin
COPY ./ /var/www/html
RUN composer install --optimize-autoloader --no-interaction --no-dev
RUN npm ci
RUN npm run build
RUN rm -rf node_modules
RUN chmod +x /var/www/html/docker/*.sh
EXPOSE 9000