Fix for #644
This commit is contained in:
parent
b0606edaae
commit
f96625b0f9
3 changed files with 34 additions and 27 deletions
|
|
@ -1,12 +1,20 @@
|
|||
FROM centos:8
|
||||
|
||||
# add this to avoid locale warnings
|
||||
RUN yum -y install glibc-locale-source glibc-langpack-en
|
||||
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
|
||||
# enable the postgresql repo
|
||||
RUN yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
|
||||
# enable epel and powertools repos
|
||||
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
RUN dnf -y install 'dnf-command(config-manager)' && dnf -y config-manager --set-enabled PowerTools
|
||||
# disable postgresql appstream repo
|
||||
RUN dnf -y module disable postgresql
|
||||
|
||||
RUN yum -y install \
|
||||
php-cli php-xml \
|
||||
mariadb-server mariadb php-mysqlnd php-json \
|
||||
#postgresql-server postgresql php-pgsql \
|
||||
postgresql12 postgresql12-server php-pgsql postgis30_12 \
|
||||
sqlite php-sqlite3 \
|
||||
git wget
|
||||
|
||||
|
|
|
|||
|
|
@ -21,26 +21,25 @@ FLUSH PRIVILEGES;
|
|||
EOF
|
||||
echo "done"
|
||||
|
||||
echo -n "[2/4] Starting PostgreSQL 10.6 .. "
|
||||
# # initialize postgresql
|
||||
# su - -c "/usr/bin/initdb --auth-local peer --auth-host password -D /var/lib/pgsql/data" postgres > /dev/null
|
||||
# # run postgres server
|
||||
# nohup su - -c "/usr/bin/postgres -D /var/lib/pgsql/data" postgres > /root/postgres.log 2>&1 &
|
||||
# # wait for postgres to become available
|
||||
# until su - -c "psql -U postgres -c '\q'" postgres >/dev/null 2>&1; do
|
||||
# sleep 1;
|
||||
# done
|
||||
# # create database and user on postgres
|
||||
# su - -c "psql -U postgres >/dev/null" postgres << 'EOF'
|
||||
# CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
|
||||
# CREATE DATABASE "php-crud-api";
|
||||
# GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" to "php-crud-api";
|
||||
# \c "php-crud-api";
|
||||
# CREATE EXTENSION IF NOT EXISTS postgis;
|
||||
# \q
|
||||
# EOF
|
||||
# echo "done"
|
||||
echo "skipped"
|
||||
echo -n "[2/4] Starting PostgreSQL 12.2 .. "
|
||||
# initialize postgresql
|
||||
su - -c "/usr/pgsql-12/bin/initdb --auth-local peer --auth-host password -D /var/lib/pgsql/data" postgres > /dev/null
|
||||
# run postgres server
|
||||
nohup su - -c "/usr/pgsql-12/bin/postgres -D /var/lib/pgsql/data" postgres > /root/postgres.log 2>&1 &
|
||||
# wait for postgres to become available
|
||||
until su - -c "psql -U postgres -c '\q'" postgres >/dev/null 2>&1; do
|
||||
sleep 1;
|
||||
done
|
||||
# create database and user on postgres
|
||||
su - -c "psql -U postgres >/dev/null" postgres << 'EOF'
|
||||
CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
|
||||
CREATE DATABASE "php-crud-api";
|
||||
GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" to "php-crud-api";
|
||||
\c "php-crud-api";
|
||||
CREATE EXTENSION IF NOT EXISTS postgis;
|
||||
\q
|
||||
EOF
|
||||
echo "done"
|
||||
|
||||
echo -n "[3/4] Starting SQLServer 2017 ... "
|
||||
echo "skipped"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue