-
Notifications
You must be signed in to change notification settings - Fork 5
feat(postgres): modify the docker base image as postgres:11-alpine #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ccb43ae
fix(Dockerfile): empty continuation lines will become errors in a fut…
d109a6c
Merge branch 'master' of https://github.com/duanhongyi/postgres
duanhongyi 779533f
fix(WARNING): MSG: WALE_S3_ENDPOINT defined, ignoring AWS_REGION
duanhongyi 589cb44
feat(minio): support the latest minio
duanhongyi f854953
feat(postgres): modify the docker base image as postgres:11-alpine
duanhongyi 1086b75
chore(scripts): avoid different scripts doing the same thing
duanhongyi 336b7d8
Merge branch 'master' into master
duanhongyi 90431d8
feat(wal-e): add WALE_S3_SSE environment variable
duanhongyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,40 @@ | ||
| FROM postgres:11 | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
| ARG BUILD_DEPS='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-wheel' | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| $BUILD_DEPS \ | ||
| gosu \ | ||
| lzop \ | ||
| libpq-dev \ | ||
| pv \ | ||
| python3 \ | ||
| util-linux \ | ||
| # swift package needs pkg_resources and setuptools | ||
| python3-pkg-resources \ | ||
| python3-setuptools \ | ||
| python3-pip && \ | ||
| ln -sf /usr/bin/python3 /usr/bin/python && \ | ||
| ln -sf /usr/bin/pip3 /usr/bin/pip | ||
|
|
||
| # setuptools from ubuntu archives is too old for googleapis-common-protos | ||
| RUN pip install --upgrade setuptools && \ | ||
| pip install --disable-pip-version-check --no-cache-dir \ | ||
| envdir==1.0.1 \ | ||
| wal-e[aws,azure,google,swift]==1.1.0 \ | ||
| gcloud==0.18.3 \ | ||
| oauth2client==4.1.3 \ | ||
| azure-storage==0.20.0 | ||
|
|
||
| # cleanup | ||
| RUN apt-get purge -y --auto-remove $BUILD_DEPS && \ | ||
| apt-get autoremove -y && \ | ||
| apt-get clean -y | ||
| FROM postgres:11-alpine | ||
Cryptophobia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ENV WALE_LOG_DESTINATION stderr | ||
| ENV WALE_ENVDIR /etc/wal-e.d/env | ||
|
|
||
| RUN mkdir -p $WALE_ENVDIR \ | ||
| && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.5/main' >> /etc/apk/repositories \ | ||
| && apk add --update --virtual .build-deps \ | ||
| git \ | ||
| build-base \ | ||
| libffi-dev \ | ||
| openssl-dev \ | ||
| python3-dev=3.5.6-r0 \ | ||
duanhongyi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| linux-headers \ | ||
| && apk add \ | ||
| lzo \ | ||
| pv \ | ||
| util-linux \ | ||
| ca-certificates \ | ||
| python3=3.5.6-r0 \ | ||
| && pip3 install --upgrade pip setuptools \ | ||
| && pip install --disable-pip-version-check --no-cache-dir \ | ||
| psycopg2-binary==2.7.6.1 \ | ||
| envdir==1.0.1 \ | ||
| wal-e[aws,azure,google,swift]==1.1.0 \ | ||
| gcloud==0.18.3 \ | ||
| oauth2client==4.1.3 \ | ||
| azure-storage==0.20.0 \ | ||
| && apk del .build-deps \ | ||
Cryptophobia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| && rm -rf /var/cache/apk/* | ||
|
|
||
| COPY rootfs / | ||
| ENV WALE_ENVDIR=/etc/wal-e.d/env | ||
| RUN mkdir -p $WALE_ENVDIR | ||
|
|
||
| ARG PATCH_CMD="python3 /patcher-script.py" | ||
| RUN $PATCH_CMD file /bin/create_bucket /patcher-script.d/patch_boto_s3.py | ||
| RUN $PATCH_CMD file /usr/local/bin/wal-e /patcher-script.d/patch_boto_s3.py | ||
| RUN $PATCH_CMD module wal_e.cmd /patcher-script.d/patch_boto_s3.py | ||
| RUN $PATCH_CMD module wal_e.worker.worker_util /patcher-script.d/patch_wal_e_s3.py | ||
|
|
||
|
|
||
| CMD ["/docker-entrypoint.sh", "postgres"] | ||
| EXPOSE 5432 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/usr/bin/env python | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import os | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ if [[ -f "$PGDATA/recovery.conf" ]]; then | |
| exit 1 | ||
| fi | ||
|
|
||
| gosu postgres pg_ctl status | ||
| su-exec postgres pg_ctl status | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Run periodic backups in the background | ||
| gosu postgres backup & | ||
| su-exec postgres backup & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.