Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "PR-5950: Update Python to 3.10" #197

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[safe]
directory = /CIRRUS-core
directory = /CIRRUS-DAAC
directory = /CIRRUS-DAAC
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* add a Makefile target to import tea lambda cloudwatch group if getting an "The
specified log group already exists" error: `make import-thin-egress-log`
* add .gitconfig file to Docker image to mark /CIRRUS-core and /CIRRUS-DAAC as safe
* Update Amazon linux to 2023
* Update python to 3.10

## v18.2.0.0

Expand Down
44 changes: 7 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazonlinux:2023 as core_base
FROM amazonlinux:2 as core_base
# This image can be used to do Python 3 & NodeJS development, and
# includes the AWS CLI and Terraform. It contains:

Expand Down Expand Up @@ -47,51 +47,21 @@ ARG USER
RUN \
echo "user:x:${USER}:0:root:/:/bin/bash" >> /etc/passwd

#COPY .gitconfig /.gitconfig
COPY .gitconfig /.gitconfig

WORKDIR /CIRRUS-core

# Python310 target
FROM core_base AS python310
ENV PYTHON_3_10_VERSION "3.10.14"
RUN \
dnf groupinstall "Development Tools" -y && \
dnf install openssl-devel bzip2-devel libffi-devel sqlite-devel -y && \
cd /usr/local && \
wget https://www.python.org/ftp/python/${PYTHON_3_10_VERSION}/Python-${PYTHON_3_10_VERSION}.tgz && \
tar xzf Python-${PYTHON_3_10_VERSION}.tgz && cd Python-${PYTHON_3_10_VERSION} && \
./configure --enable-optimizations \
--enable-shared \
--enable-loadable-sqlite-extensions \
--prefix /usr/local \
LDFLAGS=-Wl,-rpath=/usr/local/lib && \
make altinstall && \
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 1 && \
python3 -m pip install boto3

# Python38 target
FROM core_base AS python38
ENV PYTHON_3_8_VERSION "3.8.16"
FROM core_base as python38
RUN \
dnf groupinstall "Development Tools" -y && \
dnf install openssl-devel bzip2-devel libffi-devel sqlite-devel -y && \
cd /usr/local && \
wget https://www.python.org/ftp/python/${PYTHON_3_8_VERSION}/Python-${PYTHON_3_8_VERSION}.tgz && \
tar xzf Python-${PYTHON_3_8_VERSION}.tgz && cd Python-${PYTHON_3_8_VERSION} && \
./configure --enable-optimizations \
--enable-shared \
--enable-loadable-sqlite-extensions \
--prefix /usr/local \
LDFLAGS=-Wl,-rpath=/usr/local/lib && \
make altinstall && \
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 1 && \
amazon-linux-extras install python3.8 && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 -m pip install boto3


# Python3 target
FROM core_base AS python3
FROM core_base as python3
# Python 3
RUN \
yum install -y python3-devel && \
yum install -y python3-pip && \
python3 -m pip install boto3
Loading