-
-
Save maheee/309641ce45a511bc61dd12b1eb10c55e to your computer and use it in GitHub Desktop.
Dockerfile for postgres + timescaledb + timescaledb-toolkit
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
FROM postgres:15-bullseye | |
RUN apt update | |
RUN apt install -y gnupg postgresql-common apt-transport-https lsb-release wget | |
RUN export YES='yes'; /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh | |
RUN echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | tee /etc/apt/sources.list.d/timescaledb.list | |
RUN wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg | |
RUN apt update | |
RUN apt install -y timescaledb-2-postgresql-15 | |
RUN apt install -y timescaledb-toolkit-postgresql-15 | |
ENV PGDATA=/var/lib/postgresql/data | |
VOLUME /var/lib/postgresql/data | |
COPY ./src/init.sh /docker-entrypoint-initdb.d/ | |
ENTRYPOINT ["docker-entrypoint.sh"] | |
CMD ["postgres"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
init.sh: