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

Add Python 3.7/alpine3.8 #303

Closed

Conversation

tao12345666333
Copy link
Contributor

@tao12345666333 tao12345666333 commented Jul 6, 2018

Add Alpine 3.8 and change openssl to libressl. Because Alpine 3.8 updated libressl to 2.7.4-r0 which Python 3.7's ssl module can compatible with it.

Now the official Alpine 3.8 is not not available. gliderlabs/docker-alpine#418

So I build one Alpine 3.8 image locally and test this change.

~ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
~ # python
Python 3.7.0 (default, Jul  6 2018, 06:55:30)
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.                                                           
>>> import ssl
>>> ssl.OPENSSL_VERSION
'LibreSSL 2.7.4'

After the Alpine 3.8 image be available, I will change .travis.yml

Fixes #300

@tao12345666333
Copy link
Contributor Author

The Alpine 3.8 image has been available. Updated .travis.yml.

@JayH5
Copy link
Contributor

JayH5 commented Jul 6, 2018

@tao12345666333

You'll need #304 and to update update.sh with something like:

diff --git a/update.sh b/update.sh
index 11683d6..7f53640 100755
--- a/update.sh
+++ b/update.sh
@@ -112,7 +112,7 @@ for version in "${versions[@]}"; do
 	echo "$version: $fullVersion"
 
 	for v in \
-		alpine{3.6,3.7} \
+		alpine{3.6,3.7,3.8} \
 		{wheezy,jessie,stretch}{/slim,/onbuild,} \
 		windows/nanoserver-{1709,sac2016} \
 		windows/windowsservercore-{1709,ltsc2016} \
@@ -154,8 +154,8 @@ for version in "${versions[@]}"; do
 		esac
 
 		# https://bugs.python.org/issue32598 (Python 3.7.0b1+)
-		# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL doesn't implement (yet?)
-		if [[ "$version" == 3.7* ]] && [[ "$variant" == alpine* ]]; then
+		# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL 2.6 in Alpine 3.7 doesn't implement
+		if [[ "$version" == 3.7* ]] && [[ "$variant" == alpine3.7 ]]; then
 			sed -ri -e 's/libressl/openssl/g' "$dir/Dockerfile"
 		fi
 

A Python 2.7/Alpine 3.8 image would be cool too 🙋🏼‍♂️

@tao12345666333
Copy link
Contributor Author

@JayH5 Thanks. I have updated it.

# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL doesn't implement (yet?)
if [[ "$version" == 3.7* ]] && [[ "$variant" == alpine* ]]; then
# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL 2.6.x in Alpine 3.7 doesn't implement
if [[ "$version" == 3.7* ]] && [[ "$variant" == alpine3.7 ]]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be alpine3.8 instead of alpine3.7, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lorddaedra It isn't. On alpine3.8 we can use libressl , the package's version is 2.7.x.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like, you are right...

then we should merge this PR...

do we have any reasons to wait for anything?..

@pvizeli
Copy link

pvizeli commented Jul 13, 2018

Can we have also python 3.6 with alpine 3.8 ?

@tao12345666333
Copy link
Contributor Author

tao12345666333 commented Jul 13, 2018

@pvizeli Yes, we can. I'll be doing one shortly. tao12345666333@779ac26 After my test finish. See #311 .

@tianon
Copy link
Member

tianon commented Jul 13, 2018 via email

@tao12345666333 tao12345666333 deleted the add-alpine3.8 branch July 17, 2018 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants