Skip to content

Commit 1d55f9c

Browse files
author
Dominik Falkner
committed
Add risc specific layer
1 parent 7d6371e commit 1d55f9c

3 files changed

Lines changed: 13 additions & 61 deletions

File tree

‎{{ cookiecutter.__package_name_kebab_case }}/Dockerfile-base‎

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
# This dockerfile serves as a base for all testing images.
22
# It contains the minimal dependencies and is therefore smaller.
3-
from debian:stable-slim
3+
FROM registry.risc-software.at/common/ci-templates/python/pyenv:latest
4+
45
ARG PYTHON_VERSION={{cookiecutter.python_version}}
56
ARG POETRY_VERSION=1.5.1
6-
7-
ENV DEBIAN_FRONTEND noninteractive
87
LABEL maintainer="{{cookiecutter.author_name}} <{{cookiecutter.author_email}}>"
98

10-
RUN apt-get update && apt-get install -yq \
11-
build-essential \
12-
libssl-dev \
13-
zlib1g-dev \
14-
libbz2-dev \
15-
libreadline-dev \
16-
libsqlite3-dev \
17-
curl \
18-
libncursesw5-dev \
19-
xz-utils \
20-
tk-dev \
21-
libxml2-dev \
22-
libxmlsec1-dev \
23-
libffi-dev \
24-
liblzma-dev \
25-
git \
26-
python3-distutils \
27-
&& rm -rf /var/lib/apt/lists/*
28-
29-
ENV PYENV_ROOT $HOME/.pyenv
30-
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
31-
32-
# Install pyenv
33-
RUN set -ex \
34-
&& curl https://pyenv.run | bash \
35-
&& pyenv update \
36-
&& eval "$(pyenv init -)" && pyenv --versio
9+
RUN pip install --upgrade pip
3710

3811
# Install python and set interpreter
3912
RUN pyenv install -s ${PYTHON_VERSION} && pyenv global ${PYTHON_VERSION}

‎{{ cookiecutter.__package_name_kebab_case }}/Dockerfile-test‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
# This dockerfile serves as a base for all testing images.
2-
# It contains the minimal dependencies and is therefore smaller.
3-
from debian:stable-slim
2+
# It contains all dependencies and is therefore bigger.
3+
FROM registry.risc-software.at/common/ci-templates/python/pyenv:latest
4+
45
ARG PYTHON_VERSION={{cookiecutter.python_version}}
56
ARG POETRY_VERSION=1.5.1
6-
7-
ENV DEBIAN_FRONTEND noninteractive
87
LABEL maintainer="{{cookiecutter.author_name}} <{{cookiecutter.author_email}}>"
98

10-
RUN apt-get update && apt-get install -yq \
11-
build-essential \
12-
libssl-dev \
13-
zlib1g-dev \
14-
libbz2-dev \
15-
libreadline-dev \
16-
libsqlite3-dev \
17-
curl \
18-
libncursesw5-dev \
19-
xz-utils \
20-
tk-dev \
21-
libxml2-dev \
22-
libxmlsec1-dev \
23-
libffi-dev \
24-
liblzma-dev \
25-
git \
26-
python3-distutils \
27-
&& rm -rf /var/lib/apt/lists/*
28-
29-
ENV PYENV_ROOT $HOME/.pyenv
30-
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
31-
32-
# Install pyenv
33-
RUN set -ex \
34-
&& curl https://pyenv.run | bash \
35-
&& pyenv update \
36-
&& eval "$(pyenv init -)" && pyenv --versio
9+
RUN pip install --upgrade pip
3710

3811
# Install python and set interpreter
3912
RUN pyenv install -s ${PYTHON_VERSION} && pyenv global ${PYTHON_VERSION}

‎{{ cookiecutter.__package_name_kebab_case }}/pyproject.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ classifiers = [
2020
"Programming Language :: Python :: 3",
2121
]
2222

23+
# https://python-poetry.org/docs/repositories/#using-a-private-repository
24+
[[tool.poetry.source]]
25+
name = "risc-pypi"
26+
url = "https://pypiserver.risc-software.at/simple/"
27+
priority = "explicit"
28+
2329
# https://python-poetry.org/docs/dependency-specification/
2430
[tool.poetry.dependencies]
2531
python = "^{{ cookiecutter.python_version }}"

0 commit comments

Comments
 (0)