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

Python image from python:3.x-alpine #9

Open
hustjiangtao opened this issue Jun 11, 2019 · 3 comments
Open

Python image from python:3.x-alpine #9

hustjiangtao opened this issue Jun 11, 2019 · 3 comments

Comments

@hustjiangtao
Copy link

Will python image from python:3.x-alpine a better choice if upgrading tornado to 6.x?

@hkage
Copy link
Owner

hkage commented Jun 11, 2019

This is a valid option, indeed. I had chosen an Ubuntu base image from phusion, because I am more familiar to Debian based distributions as a development and production environment. But as far as I can see Docker is also using Alpine to reduce their images sizes.

So we can change that for the Dockerfile.

@hkage
Copy link
Owner

hkage commented Jun 11, 2019

See commit b45d353

I will merge everything into the development as soon as I finished on working at the version 0.3.0 milestone.

@hustjiangtao
Copy link
Author

Glad you have finished that work.
And it seems that another problem occured when upgrading to Python3 due to the difference between Py3 and Py2 on absolute vs relative imports.

see cookiecutter-tornado/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/urls.py

from handlers import base

# should fix under Python3
from .handlers import base

My temporary plan looks like this

demo
|__app
    |__url.py
    |__handlers
        |__user.py
# url.py
from app.handlers import user
...

Hope you can find a better way to solve it.

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

No branches or pull requests

2 participants