certbot / certbot

Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update the official dockerfile to use Python3

larssb opened this issue · comments

INFO

My operating system is (include version):

  • Docker v18.09.2

I installed Certbot with (certbot-auto, OS package manager, pip, etc):

Other info

  • Certbot version: provided by the docker image

WISH

I would like the official Certbot image/dockerfile to be updated so that it uses python:3-alpine3.9 (or a newer version of Alpine, if available) .. the important part is the Python version. Right now the Certbot docker image uses python v2.
I can confirm that certbot should officially be supporting Python3, e.g. #3179 and #4507 ... so is there a good reason for not using Python v3+ in the image?

Thank you so much 💯

I have not particular reason in my mind, except Python 2.7 is still maintained, officially supported, and the most tested version on our integration tests that uses certbot-auto, which is the closest installation procedure used in the Docker build.

So I will ask you back: have you some arguments to move on python 3 in the Docker now, instead that for instance, during the official EOL of Python 2.7?

Hi @adferrand,

Thank you for responding.

You certainly state good reasons for this project using v2.7 of Python. The thing is that I've coded some automation scripts for handling LetsEncrypt certificates (renewal, expanding and such).
These scripts use code that take advantage of features only available in Python v3. E.g. the run() of the subprocess module in the std. Python library.

Maybe there could be two Docker images. One with a tag of py3-0.31.0 and the other py2-0.31.0. That is my cup of tea :-)

Have a great day.

For now I created my own Dockerfile, where in principal, the only change is: FROM python:3-alpine3.9 at the top of the file.

Looking forward to a conclusion at some point. Would be great to have this. And thank you for working on this great project. Dedicating your time and energy on it.

Have a good 1 🥇

I would like to see an official Python 3 docker image for certbot.

I am using FROM certbot/certbot in my container and applying further customisation such as adding plugins. I often see this warning in logs:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

commented

There is already a pending PR: #6759