1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-12 11:14:57 +02:00
dockerfiles/postgres/README.md

36 lines
541 B
Markdown
Raw Normal View History

2016-12-07 03:35:42 +02:00
postgres
========
![](https://www.postgresql.org/media/img/docs/hdr_logo.png)
## docker-compose.yml
```yaml
postgres:
image: postgres:alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=postgres
restart: always
```
## up and running
```bash
$ docker-compose up -d
2018-02-05 12:06:03 +02:00
$ docker-compose exec postgres psql -U root postgres
2016-12-07 03:35:42 +02:00
>>> SELECT CURRENT_TIMESTAMP;
now
-------------------------------
2016-12-07 01:44:29.872928+00
(1 row)
2018-02-05 12:06:03 +02:00
>>> \?
>>> \d
2016-12-07 03:35:42 +02:00
>>> \q
```