mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
提交postgresql的docker容器
This commit is contained in:
parent
17710e8392
commit
4bf40b6e95
15
postgresql/Dockerfile
Normal file
15
postgresql/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM postgres:10.1-alpine
|
||||
|
||||
MAINTAINER kennylee26 <kennylee26@gmail.com>
|
||||
|
||||
# 使用阿里云镜像
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# Install base packages
|
||||
RUN apk --no-cache update && \
|
||||
apk --no-cache upgrade && \
|
||||
apk --no-cache add curl bash tzdata tar unzip && \
|
||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||
echo "Asia/Shanghai" > /etc/timezone && \
|
||||
echo -ne "Alpine Linux 3.6 image. (`uname -rsv`)\n" >> /root/.built && \
|
||||
rm -fr /tmp/* /var/cache/apk/*
|
19
postgresql/README.md
Normal file
19
postgresql/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# PostgreSQL
|
||||
|
||||
使用方法参考:
|
||||
|
||||
```
|
||||
postgresql:
|
||||
restart: always
|
||||
image: postgres:9.6.2-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=gitlab
|
||||
- POSTGRES_PASSWORD=gitlab
|
||||
- POSTGRES_DB=gitlabhq_production
|
||||
# the following are hints on what volumes to mount if you want to persist data
|
||||
# volumes:
|
||||
# - data/postgresql:/var/lib/postgresql:rw
|
||||
```
|
||||
|
||||
官方 https://hub.docker.com/_/postgres/
|
||||
|
Loading…
Reference in New Issue
Block a user