Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11 #1332

Merged
merged 6 commits into from
Mar 24, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
# syntax = docker/dockerfile:1.3
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.19
FROM alpine:${ALPINE_VERSION}

RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base

# build wheels in first image
# build wheels in a build stage
ENV VIRTUAL_ENV /opt/venv
ENV PATH ${VIRTUAL_ENV}/bin:${PATH}
consideRatio marked this conversation as resolved.
Show resolved Hide resolved

RUN python3 -m venv ${VIRTUAL_ENV}

ADD . /tmp/src
RUN cd /tmp/src && git clean -xfd && git status
RUN mkdir /tmp/wheelhouse \
&& cd /tmp/wheelhouse \
&& pip3 install wheel \
&& pip3 wheel --no-cache-dir /tmp/src \
&& pip install wheel \
&& pip wheel --no-cache-dir /tmp/src \
&& ls -l /tmp/wheelhouse

FROM alpine:${ALPINE_VERSION}

# install python, git, bash, mercurial
RUN apk add --no-cache git git-lfs python3 py3-pip py3-setuptools bash docker mercurial

ENV VIRTUAL_ENV /opt/venv
ENV PATH ${VIRTUAL_ENV}/bin:${PATH}
consideRatio marked this conversation as resolved.
Show resolved Hide resolved

RUN python3 -m venv ${VIRTUAL_ENV}

# install hg-evolve (Mercurial extensions)
RUN pip3 install hg-evolve --user --no-cache-dir
RUN pip install hg-evolve --no-cache-dir

# install repo2docker
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
RUN pip3 install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
&& pip3 list
RUN pip install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
&& pip list

# add git-credential helper
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
Expand Down
Loading