Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 7b62e8e

Browse files
committed
fix: mismatched python3 and python3-dev versions in descendant images
- make matching python3-dev version available in cache - don't delete python3-dev post-build - don't clear APK cache
1 parent eca526d commit 7b62e8e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dockerbuild.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/main/" > /etc/apk/repositories
1010
echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/community/" >> /etc/apk/repositories
1111
apk update
1212

13-
# Install Python, pip, setuptools and bind aliases
13+
# Install Python, pip, setuptools, bind aliases and dev package
1414
# Python from Alpine repo is smaller vs. official Docker image
15-
apk add python3=3.6.3-r9
15+
apk add python3=3.6.5-r0 python3-dev=3.6.5-r0
1616
python3 -m ensurepip
1717
pip3 install --upgrade pip setuptools
1818

@@ -27,8 +27,7 @@ fi
2727
# Build dependencies for Python packages
2828
apk add \
2929
--virtual=.shared-build-dependencies \
30-
file binutils musl-dev \
31-
python3-dev=3.6.3-r9
30+
file binutils musl-dev
3231

3332
apk add \
3433
--virtual=.scipy-build-dependencies \
@@ -55,4 +54,3 @@ apk del .scipy-build-dependencies
5554
apk del .shared-build-dependencies
5655

5756
rm -rf /root/.cache/*
58-
rm -rf /var/cache/apk/*

0 commit comments

Comments
 (0)