forked from ucfopen/UDOIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (46 loc) · 1.46 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
55
FROM php:8.1-fpm
ARG ENVIRONMENT_TYPE
#Install dependencies and php extensions
RUN apt-get update && apt-get install -y \
git \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libpq-dev \
unzip \
wget \
supervisor \
apache2 \
&& docker-php-ext-configure gd \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql
#Install AWS CLI v2
RUN if [ "$ENVIRONMENT_TYPE" != "local" ] ;then \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install\
;fi
#Install node v14
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get update && apt-get install -y nodejs
# install yarn
RUN npm install --global yarn
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN apachectl start
#Create user ssm-user
RUN useradd -ms /bin/bash ssm-user
RUN mkdir -p /var/www/html \
&& chown ssm-user:www-data /var/www/html
#install composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
#Install symfony
RUN wget https://get.symfony.com/cli/installer -O - | bash && \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony
#Copy over files
COPY --chown=ssm-user:www-data . /var/www/html/
WORKDIR /var/www/html
#run setup script
RUN chmod +x deploy/udoit-ng.sh
RUN deploy/udoit-ng.sh
CMD php-fpm