Skip to content

Commit

Permalink
Changes for docker/apt install
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-jameson committed Sep 25, 2024
1 parent b7f0e7c commit 088ddb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tdrs-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ ENV DJANGO_SETTINGS_MODULE=tdpservice.settings.local
ENV DJANGO_CONFIGURATION=Local
# Allows docker to cache installed dependencies between builds
COPY Pipfile Pipfile.lock /tdpapp/
COPY sources.list /etc/apt/sources.list
#RUN bash -c 'echo "deb https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy/ buster main"' >> /etc/apt/sources.list
WORKDIR /tdpapp/
# Download latest listing of available packages:
RUN apt-get -y update
# Upgrade already installed packages:
RUN apt-get -y upgrade
# Install packages:
RUN apt-get install -y gcc graphviz graphviz-dev libpq-dev python3-dev vim curl ca-certificates

# Postgres client setup
RUN apt --purge remove postgresql postgresql-* && apt install -y postgresql-common curl ca-certificates && install -d /usr/share/postgresql-common/pgdg && \
RUN bash -c 'echo "deb [trusted=yes] https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy-postgres/ buster-pdpg main" >> /etc/apt/sources.list'
RUN apt-get update -y && apt-get upgrade -y
RUN apt install -y postgresql-common && install -d /usr/share/postgresql-common/pgdg && \
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc trusted=yes] https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy-postgres/ buster-pgdg main" >> /etc/apt/sources.list' && \
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
apt -y update && apt install postgresql-client-15 -y
# Install packages:
RUN apt install -y gcc graphviz graphviz-dev libpq-dev python3-dev vim
apt -y update && apt -y upgrade && apt install postgresql-client-15 -y

# Install pipenv
RUN pip install --upgrade pip pipenv
RUN pipenv install --dev --system --deploy
Expand Down
3 changes: 3 additions & 0 deletions tdrs-backend/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deb https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy/ buster main
deb https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy/ buster-updates main
deb https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy-security/ buster/updates main

0 comments on commit 088ddb3

Please sign in to comment.