-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile_build
More file actions
48 lines (36 loc) · 1.18 KB
/
Dockerfile_build
File metadata and controls
48 lines (36 loc) · 1.18 KB
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
# https://hub.docker.com/_/php
# https://github.com/docker-library/repo-info/tree/master/repos/php/remote
FROM php:8.2-fpm
# Arguments defined in docker-compose.yml
ARG user
ARG user_id
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
locales \
git \
unzip \
npm \
zip \
zlib1g
# Clear cache
#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions (script specific to official php docker container)
#RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip \
# && git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached \
# && cd /usr/src/php/ext/memcached \
# && docker-php-ext-configure memcached \
# && docker-php-ext-install memcached
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
RUN mkdir -p /home/$user/ && \
mkdir -p /home/$user/.composer && \
useradd -G www-data,root -u $user_id -d /home/$user $user && \
chown -R $user:$user /home/$user
WORKDIR /var/www
USER $user
#EXPOSE 9000
#CMD ["php-fpm"]
#CMD ["memcached"]
#CMD /usr/local/bin/start_services.sh