2024-07-20 19:38:21 +00:00
|
|
|
FROM ubuntu:22.04 as skeleton
|
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
ENV NODE_VERSION "20.12.2"
|
|
|
|
ENV NVM_VERSION "0.37.2"
|
|
|
|
|
|
|
|
ENV PYTHON_VERSION "3.12"
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV TZ Etc/UTC
|
2024-07-20 19:38:21 +00:00
|
|
|
|
|
|
|
RUN apt update && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
apt install -y \
|
|
|
|
curl \
|
|
|
|
podman \
|
|
|
|
jq \
|
|
|
|
git \
|
|
|
|
xz-utils \
|
|
|
|
ca-certificates \
|
|
|
|
--no-install-recommends \
|
2024-07-28 19:07:29 +00:00
|
|
|
--autoremove && \
|
|
|
|
apt-get clean
|
|
|
|
|
|
|
|
COPY ./files/registries.conf /etc/containers/registries.conf
|
|
|
|
|
|
|
|
FROM skeleton AS build-python
|
|
|
|
|
|
|
|
RUN apt update && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
apt install -y \
|
|
|
|
build-essential \
|
|
|
|
libssl-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libbz2-dev \
|
|
|
|
libreadline-dev \
|
|
|
|
libsqlite3-dev \
|
|
|
|
libncursesw5-dev \
|
|
|
|
tk-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxmlsec1-dev \
|
|
|
|
libffi-dev \
|
|
|
|
liblzma-dev \
|
|
|
|
--no-install-recommends \
|
|
|
|
--autoremove && \
|
|
|
|
apt-get clean
|
2024-07-20 19:38:21 +00:00
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
RUN curl https://pyenv.run | bash
|
2024-07-20 19:38:21 +00:00
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
ENV PATH /root/.pyenv/bin:$PATH
|
2024-07-20 19:38:21 +00:00
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
RUN pyenv install $PYTHON_VERSION
|
2024-07-20 19:38:21 +00:00
|
|
|
|
|
|
|
FROM skeleton as runner
|
|
|
|
|
|
|
|
WORKDIR /runner
|
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
|
2024-07-25 23:08:37 +00:00
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
RUN . $HOME/.nvm/nvm.sh && \
|
|
|
|
nvm install $NODE_VERSION && \
|
|
|
|
nvm use $NODE_VERSION && \
|
|
|
|
nvm cache clear
|
2024-07-20 19:38:21 +00:00
|
|
|
|
2024-07-28 19:07:29 +00:00
|
|
|
ENV NVM_DIR $HOME/.nvm
|
|
|
|
ENV PATH /root/.nvm/versions/node/v$NODE_VERSION/bin:$PATH
|
|
|
|
|
|
|
|
RUN node --version
|
|
|
|
|
|
|
|
RUN corepack enable
|
|
|
|
|
|
|
|
COPY --from=build-python /root/.pyenv /root/.pyenv
|
|
|
|
|
|
|
|
ENV PATH /root/.pyenv/bin:/root/.pyenv/shims:$PATH
|
|
|
|
|
|
|
|
RUN pyenv global $PYTHON_VERSION
|
|
|
|
|
|
|
|
RUN python --version
|
|
|
|
|
|
|
|
RUN pip install pipx
|