Skip to content

Instantly share code, notes, and snippets.

@buivuanh
Last active December 27, 2022 09:11
Show Gist options
  • Save buivuanh/c2431e93e03c260fb938fc3639fa9720 to your computer and use it in GitHub Desktop.
Save buivuanh/c2431e93e03c260fb938fc3639fa9720 to your computer and use it in GitHub Desktop.

Revisions

  1. buivuanh revised this gist Dec 27, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions postgres-pgtap-Dockerfile
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ RUN apt-get update \
    RUN chmod -R 777 /usr/share/doc
    RUN chmod -R 777 /usr/share/postgresql/14

    # https://github.com/theory/pgtap
    COPY /pgtap /pgtap
    RUN chmod -R 777 /pgtap

  2. buivuanh created this gist Dec 27, 2022.
    6 changes: 6 additions & 0 deletions install-pgtap.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    cd /pgtap
    make
    make install
    make installcheck
    psql -U postgres -c 'CREATE EXTENSION pgtap;'
    14 changes: 14 additions & 0 deletions postgres-pgtap-Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    FROM postgres:14-bullseye

    RUN apt-get update \
    && apt-get install -y make \
    && apt-get install -y patch

    RUN chmod -R 777 /usr/share/doc
    RUN chmod -R 777 /usr/share/postgresql/14

    COPY /pgtap /pgtap
    RUN chmod -R 777 /pgtap

    COPY install-pgtap.sh /docker-entrypoint-initdb.d/
    RUN chmod +x /docker-entrypoint-initdb.d/install-pgtap.sh