Dockerfile:
FROM postgres:12.10-alpine AS base
FROM base AS build
COPY init_db.sql /docker-entrypoint-initdb.d/
что делаю не так? спасибо!
что не работает? в логи смотрел?
а как логи глянуть?
docker logs $containername
ага, только что нашел 2022-03-19 13:07:29.312 UTC [1] LOG: starting PostgreSQL 12.10 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit 2022-03-19 13:07:29.312 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2022-03-19 13:07:29.312 UTC [1] LOG: listening on IPv6 address "::", port 5432 2022-03-19 13:07:29.313 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-03-19 13:07:29.324 UTC [21] LOG: database system was shut down at 2022-03-19 13:04:59 UTC 2022-03-19 13:07:29.327 UTC [1] LOG: database system is ready to accept connections 2022-03-19 13:09:08.078 UTC [109] FATAL: role "root" does not exist 2022-03-19 13:09:13.052 UTC [121] FATAL: role "root" does not exist
Обсуждают сегодня