xxxxxxxxxx
1
registry.cn-hangzhou.aliyuncs.com/odoomaster/postgres
已复制
增加远程访问,dockerfile
xxxxxxxxxx
1
FROM postgres:9.6.9-alpine
2
3
RUN echo "listen_addresses = '*'" >> /usr/local/share/postgresql/postgresql.conf.sample
4
RUN echo "host all all 0.0.0.0/0 md5" >> /usr/local/share/postgresql/pg_hba.conf.sample
5
6
COPY init-user-db.sh /docker-entrypoint-initdb.d
7
8
ENTRYPOINT ["docker-entrypoint.sh"]
9
10
EXPOSE 5432
11
CMD ["postgres"]
已复制
init-user-db.sh文件
xxxxxxxxxx
1
#!/bin/bash
2
set -e
3
4
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
5
CREATE DATABASE flowable;
6
CREATE DATABASE flowableidm;
7
CREATE DATABASE flowableadmin;
8
EOSQL
已复制