Skip to content

Commit

Permalink
Merge pull request #4092 from fedspendingtransparency/mod/dockerfile-…
Browse files Browse the repository at this point in the history
…python310

switch to rocky linux
  • Loading branch information
boozallendanny committed Jun 7, 2024
2 parents 8dab2e7 + 42b98cf commit 2211ed7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@

# See docker-compose.yml file and README.md for docker-compose information

FROM centos:7
FROM rockylinux:8

# Build ARGs
ARG PYTHON_VERSION=3.10.12

WORKDIR /dockermount

RUN yum -y update && yum clean all
# update to use centos official mirrors only
RUN sed -i '/#baseurl/s/^#//g' /etc/yum.repos.d/Rocky-*
RUN sed -i '/mirrorlist/s/^/#/g' /etc/yum.repos.d/Rocky-*

RUN dnf -y update
# sqlite-devel added as prerequisite for coverage python lib, used by pytest-cov plugin
RUN yum -y install wget gcc openssl-devel bzip2-devel libffi libffi-devel zlib-devel sqlite-devel xz-devel
RUN yum -y groupinstall "Development Tools"
RUN dnf -y install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make
RUN dnf -y groupinstall "Development Tools"

##### Install PostgreSQL 13 client (psql)
RUN yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
RUN yum -y install postgresql13
RUN rpm --import https://download.postgresql.org/pub/repos/yum/keys/RPM-GPG-KEY-PGDG-AARCH64-RHEL8
RUN dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
RUN dnf -qy module disable postgresql
RUN dnf -y install postgresql13

##### Building python 3.x
WORKDIR /usr/src
Expand All @@ -37,6 +43,8 @@ WORKDIR /dockermount
COPY requirements/ /dockermount/requirements/
RUN python3 -m pip install -r requirements/requirements.txt

RUN python3 -m pip install -r requirements/requirements-server.txt ansible==2.9.15 awscli

##### Copy the rest of the project files into the container
COPY . /dockermount

Expand Down

0 comments on commit 2211ed7

Please sign in to comment.