Skip to content

Commit

Permalink
various updates to Dockerfile including:
Browse files Browse the repository at this point in the history
- update python version
- remove unnecessary python 3.5 condition
- update pyenv pre-requisites
  • Loading branch information
digorgonzola committed Jul 5, 2022
1 parent c695897 commit 0a1cbc3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
25 changes: 9 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ ENV TZ=Australia/Hobart
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV PATH /home/builder/.local/bin:$PATH
ENV PYTHON_VERSION 3.5.2
ENV PYTHON_VERSION 3.8.13

RUN apt-get update && \
apt-get install -y software-properties-common && \
rm -rf /var/lib/apt/lists/*

RUN add-apt-repository ppa:rael-gc/rvm && apt-get update

RUN if [ X"$PYTHON_VERSION" = X"3.5.2" ]; \
then apt-get install -y libssl1.0-dev; \
else apt-get install -y libssl-dev; \
fi

RUN apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
Expand All @@ -29,11 +24,10 @@ RUN apt-get install -y --no-install-recommends \
python3-dev \
wget \
libffi-dev \
# Pyenv pre-requisites
make zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev \
liblzma-dev python-openssl \
# Pyenv pre-requisites (from https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
&& rm -rf /var/lib/apt/lists/*

# Set-up necessary Env vars for PyEnv
Expand All @@ -48,13 +42,12 @@ RUN set -ex \
&& pyenv rehash \
&& chmod -R a+w $PYENV_ROOT/shims

RUN pip install --upgrade pip==20.3.4 setuptools==50.3.2
RUN pip install --upgrade pip==22.1.2 setuptools==63.1.0 wheel

RUN pip install \
Cython==0.29 \
numpy>=1.13.0 \
bump2version==0.5.10 \
wheel
Cython==0.29.30 \
bump2version==1.0.1 \
numpy==1.23.0

RUN useradd --create-home --no-log-init --shell /bin/bash --uid $BUILDER_UID builder
USER builder
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'

services:
dev:
image: ncwriter-build
image: aodntools-build
build:
context: .
args:
Expand Down

0 comments on commit 0a1cbc3

Please sign in to comment.