Skip to content

Commit f667caf

Browse files
authored
Merge pull request #1332 from yuvipanda/bump-alpine
Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11
2 parents 755a32b + 91d3f15 commit f667caf

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
# syntax = docker/dockerfile:1.3
2-
ARG ALPINE_VERSION=3.17
2+
ARG ALPINE_VERSION=3.19
33
FROM alpine:${ALPINE_VERSION}
44

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

7-
# build wheels in first image
7+
# build wheels in a build stage
8+
ARG VIRTUAL_ENV=/opt/venv
9+
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
10+
11+
RUN python3 -m venv ${VIRTUAL_ENV}
12+
813
ADD . /tmp/src
914
RUN cd /tmp/src && git clean -xfd && git status
1015
RUN mkdir /tmp/wheelhouse \
1116
&& cd /tmp/wheelhouse \
12-
&& pip3 install wheel \
13-
&& pip3 wheel --no-cache-dir /tmp/src \
17+
&& pip install wheel \
18+
&& pip wheel --no-cache-dir /tmp/src \
1419
&& ls -l /tmp/wheelhouse
1520

1621
FROM alpine:${ALPINE_VERSION}
1722

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

26+
ARG VIRTUAL_ENV=/opt/venv
27+
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
28+
29+
RUN python3 -m venv ${VIRTUAL_ENV}
30+
2131
# install hg-evolve (Mercurial extensions)
22-
RUN pip3 install hg-evolve --user --no-cache-dir
32+
RUN pip install hg-evolve --no-cache-dir
2333

2434
# install repo2docker
2535
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
26-
RUN pip3 install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
27-
&& pip3 list
36+
RUN pip install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
37+
&& pip list
2838

2939
# add git-credential helper
3040
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env

0 commit comments

Comments
 (0)