-
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 #2 from husseinmkwizu/feature/timescale-pg16-ts2.13
build timescaledb with postgres db v16 and timescale v2.13
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
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,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"] |