-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·54 lines (45 loc) · 1.21 KB
/
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
50
51
52
53
54
ARG DEBIAN_VERSION=bullseye
FROM php:8.3-fpm-${DEBIAN_VERSION}
ARG DEBIAN_VERSION
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
bash-completion \
ca-certificates \
g++ \
git \
gnupg \
htop \
libpq-dev \
libzip-dev \
mc \
nano \
libpng-dev \
libicu-dev \
unzip \
vim \
wget && \
apt-get clean
#USER root
## install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# install necessary php extensions for running application
RUN docker-php-ext-install \
bcmath \
fileinfo \
gd \
intl \
opcache \
zip
USER root
# set www-data user his home directory
# the user "www-data" is used when running the image, and therefore should own the workdir
RUN usermod -m -d /home/www-data www-data && \
mkdir -p /var/www/html && \
chown -R www-data:www-data /home/www-data /var/www/html
#RUN chown www-data:www-data /composer.json
# Switch to user
USER www-data
# enable bash completion
RUN echo "source /etc/bash_completion" >> ~/.bashrc