1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-12 11:14:57 +02:00
dockerfiles/postgres
2018-02-05 18:06:03 +08:00
..
arm add postgres-arm 2017-11-01 21:35:27 +08:00
docker-compose.yml add postgres 2016-12-07 09:46:01 +08:00
README.md update postgres 2018-02-05 18:06:03 +08:00

postgres

docker-compose.yml

postgres:
  image: postgres:alpine
  ports:
    - "5432:5432"
  environment:
    - POSTGRES_USER=root
    - POSTGRES_PASSWORD=root
    - POSTGRES_DB=postgres
  restart: always

up and running

$ docker-compose up -d

$ docker-compose exec postgres psql -U root postgres
>>> SELECT CURRENT_TIMESTAMP;
              now
-------------------------------
 2016-12-07 01:44:29.872928+00
(1 row)

>>> \?
>>> \d
>>> \q