-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Andrew-Bekhiet/main
feat: add timescale 2.17 with postgres 17
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM timescale/timescaledb-ha:pg17-ts2.17 | ||
|
||
# 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, /usr/bin/openssl" > /etc/sudoers.d/postgres | ||
|
||
# Add init scripts while setting permissions | ||
COPY --chmod=755 init-ssl.sh /docker-entrypoint-initdb.d/init-ssl.sh | ||
COPY --chmod=755 wrapper.sh /usr/local/bin/wrapper.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"] |