-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile.base
57 lines (46 loc) · 1.42 KB
/
Dockerfile.base
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
56
57
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="America/Los_Angeles"
RUN apt update
# In ubuntu 20.04, installing php without specifying a version installs 7.4 :)
RUN apt install -y php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-imagick php-dom php-sqlite3 \
nginx vim curl unzip wget supervisor cron mysql-client build-essential
#
# node
#
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt -y install nodejs
#
# install composer
#
RUN wget -O composer-setup.php https://getcomposer.org/installer
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN composer self-update
#
# cron
#
COPY build-files/laravel-cron /etc/cron.d/laravel-cron
RUN chmod 0644 /etc/cron.d/laravel-cron && crontab /etc/cron.d/laravel-cron
#
# docker client
#
ENV DOCKERVERSION=20.10.5
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 \
-C /usr/local/bin docker/docker \
&& rm docker-${DOCKERVERSION}.tgz
#
# configure php-fpm to run as root
#
RUN sed -i 's/www-data/root/g' /etc/php/7.4/fpm/pool.d/www.conf
#
# nginx
#
COPY build-files/nginx.conf /etc/nginx/nginx.conf
#
# supervisord
#
COPY build-files/services.conf /etc/supervisor/conf.d/services.conf
RUN mkdir -p /code/pm4
WORKDIR /code/pm4
EXPOSE 80 443 6001