Skip to content

Commit

Permalink
Merge pull request #2 from husseinmkwizu/feature/timescale-pg16-ts2.13
Browse files Browse the repository at this point in the history
build timescaledb with postgres db v16 and timescale v2.13
  • Loading branch information
melissa-hale authored Jan 11, 2024
2 parents b14cf44 + b88dccb commit f64411f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
dockerfile: ['Dockerfile.pg13-ts2.12', 'Dockerfile.pg14-ts2.12','Dockerfile.pg15-ts2.12']
dockerfile: ['Dockerfile.pg13-ts2.12', 'Dockerfile.pg14-ts2.12','Dockerfile.pg15-ts2.12','Dockerfile.pg16-ts2.13']

steps:
- name: Checkout sources
Expand Down
29 changes: 29 additions & 0 deletions Dockerfile.pg16-ts2.13
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM timescale/timescaledb-ha:pg16-ts2.13

# Switch to root user for apt operations
USER root

# Install OpenSSL and sudo
RUN apt-get update && apt-get install -y openssl sudo

# Allow the postgres user to execute certain commands as root without a password
RUN echo "postgres ALL=(root) NOPASSWD: /usr/bin/mkdir, /bin/chown" > /etc/sudoers.d/postgres

# Add entrypoint wrapper
COPY wrapper.sh /usr/local/bin/wrapper.sh

# Add init script
COPY init-ssl.sh /docker-entrypoint-initdb.d/

# Set permissions
RUN chmod +x /usr/local/bin/wrapper.sh
RUN chmod +x /docker-entrypoint-initdb.d/init-ssl.sh

# Switch back to the postgres
USER postgres

# Override the ENTRYPOINT with a wrapper script
ENTRYPOINT ["wrapper.sh"]

# Start postgres listening on port 5432
CMD ["postgres", "--port=5432"]

0 comments on commit f64411f

Please sign in to comment.