Skip to content

Commit

Permalink
chore: update python version in dockerfile (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
huniafatima-arbi authored Dec 9, 2024
1 parent 66ee1db commit 8796f45
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions dockerfiles/commerce-coordinator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,47 @@ MAINTAINER [email protected]
# python3-pip; install pip to install application requirements.txt files
# python; ubuntu doesnt ship with python, so this is the python we will use to run the application

ENV TZ=UTC
ENV TERM=xterm-256color
ENV DEBIAN_FRONTEND=noninteractive
ARG PYTHON_VERSION=3.12

# If you add a package here please include a comment above describing what it is used for

RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-add-repository -y ppa:deadsnakes/ppa

RUN apt-get update && apt-get -qy install --no-install-recommends \
gcc \
curl \
git \
build-essential \
language-pack-en \
libmysqlclient-dev \
libssl-dev \
locales \
curl \
pkg-config \
python3-dev \
python3-pip \
python3.8

libmysqlclient-dev \
libssl-dev \
libffi-dev \
libsqlite3-dev \
git \
wget \
python3.12 \
python3.12-dev \
python3.12-distutils \
python3-pip

RUN pip install --upgrade pip setuptools
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN pip install virtualenv

# Delete apt package lists because we do not need them inflating our image
RUN rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/venv
RUN virtualenv -p python$PYTHON_VERSION $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip install pip==24.0 setuptools==69.5.1

RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE=commerce_coordinator.settings.production

EXPOSE 8140
Expand Down

0 comments on commit 8796f45

Please sign in to comment.