-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfilepostgres
More file actions
87 lines (52 loc) · 2.42 KB
/
Dockerfilepostgres
File metadata and controls
87 lines (52 loc) · 2.42 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#FROM postgres:10
FROM php:7.3-apache
LABEL maintainer="SandyMadaan"
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
EXPOSE 80
WORKDIR /var/www/html
RUN apt-get -y update && apt-get install -y curl \
&& curl -sL https://deb.nodesource.com/setup_4.x | bash \
&& apt-get -y install nodejs && apt-get -y install npm
RUN npm install -g npm@latest
RUN npm install -g newman
RUN newman --version
RUN apt-get -y update \
&& apt-get install -y git unzip libicu-dev libpq-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl mbstring pdo pdo_mysql pdo_pgsql pgsql
RUN apt-get -y update \
&& apt-get -y install gcc g++ make autoconf libc-dev pkg-config
RUN apt-get -y install libz-dev libpcre2-dev automake
RUN apt-get -y install lsb-release apt-transport-https ca-certificates curl sudo
RUN apt-get -y install wget
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list
RUN apt-get -y update
RUN apt -y update
RUN apt -y install apt-utils
RUN apt policy php7.3-cli
RUN apt policy php7.3-dev
RUN apt policy php-pear
RUN pecl install grpc
RUN bash -c "echo extension=grpc.so > /usr/local/etc/php/conf.d/grpc.ini"
RUN service apache2 restart
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y software-properties-common postgresql-11 postgresql-client-11 postgresql-contrib-11
USER postgres
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
createdb -O docker docker
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/11/main/pg_hba.conf
# And add ``listen_addresses`` to ``/etc/postgresql/11/main/postgresql.conf``
RUN echo "listen_addresses='*'" >> /etc/postgresql/11/main/postgresql.conf
# Expose the PostgreSQL port
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
USER root
RUN /etc/init.d/postgresql restart