Skip to content

Commit 4688362

Browse files
committed
Add support for other python versions
1 parent b9748be commit 4688362

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
ARG PYTHON_VERSION=3.14
2+
13
FROM amazonlinux:2023
24

35
RUN yum -y update && \
46
yum -y install \
5-
python3.14 \
7+
python${PYTHON_VERSION} \
68
rsync \
7-
zip
9+
zip
10+
11+
ENV PYTHON_VERSION=${PYTHON_VERSION}

docker_install.sh renamed to install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python3.14 -m venv python
1+
python${PYTHON_VERSION} -m venv python
22
source /python/bin/activate
33

44
pip install --upgrade pip

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requests
1+
requests==2.33.1

runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $RUNTIME build -t $IMAGE .
66
$RUNTIME run -td --name=$CONTAINER $IMAGE
77
$RUNTIME cp ./requirements.txt $CONTAINER:/
88

9-
$RUNTIME exec -i $CONTAINER /bin/bash < ./docker_install.sh
9+
$RUNTIME exec -i $CONTAINER /bin/bash < ./install.sh
1010
$RUNTIME cp $CONTAINER:/tmp/python_layer.zip python_layer.zip
1111
$RUNTIME stop $CONTAINER
1212

0 commit comments

Comments
 (0)