Re: Official Django Docker Container Deprecated

2019-02-28 Thread Kye Russell
Agreed. As someone that Dockerizes all of their Django development I can
speak to how opinionated such an image would HAVE to be.

It can certainly be done, but I don’t think it should.

There is also an implied security / maintenance burden so unfortunately
even if it were appropriate, it’s not exactly work that doesn’t come with a
clear ongoing commitment.

On Thu, 28 Feb 2019 at 9:04 pm, Tom Forbes  wrote:

> I think the point we are trying to make is that it’s fundamentally not a
> good thing to try and distribute a one-size fits all docker image for a
> specific framework.
>
> For reference here is one you can use yourself:
>
> FROM python:3
> COPY requirements.txt .
> RUN pip install -r requirements.txt
> COPY . .
> CMD [ "gunicorn", "my.app" ]
>
> If someone is unable to make an equivalent Dockerfile then they will be
> really confused when they realise that they need to customise it, because
> few projects are as simple as that.
>
> You should also likely not embed Apache inside your app container - it’s
> kind of missing the general idea of Docker.
>
> To re-iterate: The Django project had no hand in creating the ‘official’
> image. The Docker project retired the original Django image for reasons
> that are clearly explained here , and
> those reasons still hold today.
>
> Tom
>
>
>
>
> On 28 February 2019 at 12:56:33, Alexander Lyabah (a.lya...@checkio.org)
> wrote:
>
> I can make a version for production use (in a week or two), for your
> critics.
>
> For example, based on Appache wsgi.
>
> PS: maybe it is also worth to make a docker image for testing changes in
> Django source?
>
> On Wednesday, February 27, 2019 at 4:31:17 PM UTC+2, Jamesie Pic wrote:
>>
>> > most people currently lean towards a microservice architecture and
>> therefore towards flask.
>> "according to the 2018 JetBrains Developer Survey" and some people.
>> Why start a project with flask in 2019 instead of Quart which or
>> Starlette is another question that I suppose is out of the scope of
>> this mailing list.
>>
>> Anyway, the point of Docker is to build your own image that supports
>> both development and production given different runtime parameters.
>> The agile practice with docker is to build your immutable image in CI,
>> test it, deploy it to staging, have on-click deployment to production.
>>
>> The security and best practice documentation from docker are indeed a
>> lot to grasp, and beginners will most of the time start making
>> insecure (running as root) and inefficient (fat) images. Therefore for
>> their security Django might want to document making a docker file,
>> perhaps based on the alpine image that's the most lightweight.
>>
>> --
>> ∞
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/f07ad32e-e74f-4cd3-945a-ed92692c2209%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAFNZOJP5k%3Dsn8VkdwseuVqnMC6X40y349urNMRFZfD7FEypvbg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANK-ykm7ub21e8Ryn37jc1O7f5sg1PNTAGjoxD_h%2BHVRMs4_1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-28 Thread Tom Forbes
I think the point we are trying to make is that it’s fundamentally not a
good thing to try and distribute a one-size fits all docker image for a
specific framework.

For reference here is one you can use yourself:

FROM python:3
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD [ "gunicorn", "my.app" ]

If someone is unable to make an equivalent Dockerfile then they will be
really confused when they realise that they need to customise it, because
few projects are as simple as that.

You should also likely not embed Apache inside your app container - it’s
kind of missing the general idea of Docker.

To re-iterate: The Django project had no hand in creating the ‘official’
image. The Docker project retired the original Django image for reasons
that are clearly explained here , and
those reasons still hold today.

Tom




On 28 February 2019 at 12:56:33, Alexander Lyabah (a.lya...@checkio.org)
wrote:

I can make a version for production use (in a week or two), for your
critics.

For example, based on Appache wsgi.

PS: maybe it is also worth to make a docker image for testing changes in
Django source?

On Wednesday, February 27, 2019 at 4:31:17 PM UTC+2, Jamesie Pic wrote:
>
> > most people currently lean towards a microservice architecture and
> therefore towards flask.
> "according to the 2018 JetBrains Developer Survey" and some people.
> Why start a project with flask in 2019 instead of Quart which or
> Starlette is another question that I suppose is out of the scope of
> this mailing list.
>
> Anyway, the point of Docker is to build your own image that supports
> both development and production given different runtime parameters.
> The agile practice with docker is to build your immutable image in CI,
> test it, deploy it to staging, have on-click deployment to production.
>
> The security and best practice documentation from docker are indeed a
> lot to grasp, and beginners will most of the time start making
> insecure (running as root) and inefficient (fat) images. Therefore for
> their security Django might want to document making a docker file,
> perhaps based on the alpine image that's the most lightweight.
>
> --
> ∞
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/f07ad32e-e74f-4cd3-945a-ed92692c2209%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFNZOJP5k%3Dsn8VkdwseuVqnMC6X40y349urNMRFZfD7FEypvbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-28 Thread Alexander Lyabah
I can make a version for production use (in a week or two), for your 
critics.

For example, based on Appache wsgi.

PS: maybe it is also worth to make a docker image for testing changes in 
Django source?

On Wednesday, February 27, 2019 at 4:31:17 PM UTC+2, Jamesie Pic wrote:
>
> > most people currently lean towards a microservice architecture and 
> therefore towards flask. 
> "according to the 2018 JetBrains Developer Survey" and some people. 
> Why start a project with flask in 2019 instead of Quart which or 
> Starlette is another question that I suppose is out of the scope of 
> this mailing list. 
>
> Anyway, the point of Docker is to build your own image that supports 
> both development and production given different runtime parameters. 
> The agile practice with docker is to build your immutable image in CI, 
> test it, deploy it to staging, have on-click deployment to production. 
>
> The security and best practice documentation from docker are indeed a 
> lot to grasp, and beginners will most of the time start making 
> insecure (running as root) and inefficient (fat) images. Therefore for 
> their security Django might want to document making a docker file, 
> perhaps based on the alpine image that's the most lightweight. 
>
> -- 
> ∞ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f07ad32e-e74f-4cd3-945a-ed92692c2209%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-27 Thread Jamesie Pic
> most people currently lean towards a microservice architecture and therefore 
> towards flask.
"according to the 2018 JetBrains Developer Survey" and some people.
Why start a project with flask in 2019 instead of Quart which or
Starlette is another question that I suppose is out of the scope of
this mailing list.

Anyway, the point of Docker is to build your own image that supports
both development and production given different runtime parameters.
The agile practice with docker is to build your immutable image in CI,
test it, deploy it to staging, have on-click deployment to production.

The security and best practice documentation from docker are indeed a
lot to grasp, and beginners will most of the time start making
insecure (running as root) and inefficient (fat) images. Therefore for
their security Django might want to document making a docker file,
perhaps based on the alpine image that's the most lightweight.

-- 
∞

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAC6Op1-5XHfW6ASmnkU2hHOVzifumLVf-E1ZrAP8%2BpQdKLj-1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-27 Thread Johannes Hoppe
I don't think that a Docker image would make local development any easier. 
I also don't see how that is implied by the reddit post and it's comments.
Looking through the posts, I agree with the assessment, that most people 
currently lean towards a microservice architecture and therefore towards 
flask.
For whatever reason, people tend to think you can't build a performant 
microservice with Django. Anyways, deploying Python applications has always 
been somewhat difficult. Especially for people coming over from PHP that 
are used to a LAMP stack.

I think it would be great if Django's documentation would not go so much 
into the details of WSGI, but give a couple of google example on how to 
deploy to Heroku, DigitalOcean and the likes of it.

On Wednesday, February 27, 2019 at 7:32:06 AM UTC+1, Alexander Lyabah wrote:
>
> but the image it self is only using runserver, which means it is only for 
> dev-server.
>
> The requirements.txt can be part of connected volume. So the image 
> contains only django and configured server.
>
> On Tuesday, February 26, 2019 at 5:28:14 PM UTC+2, Tom Forbes wrote:
>>
>> There never was an official Django image, it was an "official docker" 
>> Django image that they maintained. The page image page explains why it was 
>> deprecated: https://hub.docker.com/_/django
>>
>> For most usages of this image, it was already not bringing in django 
>>> from this image, but actually from your project's requirements.txt, so 
>>> the only "value" being added here was the pre-installing of mysql-client, 
>>> postgresql-client, and sqlite3 for various uses of the django framework.
>>>
>>
>> I fully agree with this, it made little sense as an image at all.
>>
>> On Tuesday, 26 February 2019 07:39:34 UTC, Alexander Lyabah wrote:
>>>
>>> Hi guys,
>>>
>>> I found out that official django container is deprecated. Why you don't 
>>> want to support it?
>>>
>>> When you search "django" in Python subreddit 
>>> https://monosnap.com/file/R3uAqdrcrtxjCyKgHhhe7B8lO3up5q
>>>
>>> you see "Flask has overtaken Django according to the 2018 JetBrains 
>>> Developer Survey" 
>>> https://www.reddit.com/r/Python/comments/ao5dml/flask_has_overtaken_django_according_to_the_2018/
>>>
>>> and the main point in this discussion that it is hard to start from 0 to 
>>> real project.
>>>
>>> That why I was surprised that you don't have a simple docker container 
>>> with configured django with apache or/and django with nginx . It can save 
>>> so much time for people who just want to launch a simple pet project with 3 
>>> visitors per week.
>>>
>>> Thank you, I love Django and wish you be better and bigger, have a great 
>>> week.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8d14e54d-87dd-448e-896e-49580bb10f86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-26 Thread Alexander Lyabah
but the image it self is only using runserver, which means it is only for 
dev-server.

The requirements.txt can be part of connected volume. So the image contains 
only django and configured server.

On Tuesday, February 26, 2019 at 5:28:14 PM UTC+2, Tom Forbes wrote:
>
> There never was an official Django image, it was an "official docker" 
> Django image that they maintained. The page image page explains why it was 
> deprecated: https://hub.docker.com/_/django
>
> For most usages of this image, it was already not bringing in django from 
>> this image, but actually from your project's requirements.txt, so the 
>> only "value" being added here was the pre-installing of mysql-client, 
>> postgresql-client, and sqlite3 for various uses of the django framework.
>>
>
> I fully agree with this, it made little sense as an image at all.
>
> On Tuesday, 26 February 2019 07:39:34 UTC, Alexander Lyabah wrote:
>>
>> Hi guys,
>>
>> I found out that official django container is deprecated. Why you don't 
>> want to support it?
>>
>> When you search "django" in Python subreddit 
>> https://monosnap.com/file/R3uAqdrcrtxjCyKgHhhe7B8lO3up5q
>>
>> you see "Flask has overtaken Django according to the 2018 JetBrains 
>> Developer Survey" 
>> https://www.reddit.com/r/Python/comments/ao5dml/flask_has_overtaken_django_according_to_the_2018/
>>
>> and the main point in this discussion that it is hard to start from 0 to 
>> real project.
>>
>> That why I was surprised that you don't have a simple docker container 
>> with configured django with apache or/and django with nginx . It can save 
>> so much time for people who just want to launch a simple pet project with 3 
>> visitors per week.
>>
>> Thank you, I love Django and wish you be better and bigger, have a great 
>> week.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7a8e045b-b51f-467b-9474-e56c3fb20d1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-26 Thread Tom Forbes
There never was an official Django image, it was an "official docker" 
Django image that they maintained. The page image page explains why it was 
deprecated: https://hub.docker.com/_/django

For most usages of this image, it was already not bringing in django from 
> this image, but actually from your project's requirements.txt, so the 
> only "value" being added here was the pre-installing of mysql-client, 
> postgresql-client, and sqlite3 for various uses of the django framework.
>

I fully agree with this, it made little sense as an image at all.

On Tuesday, 26 February 2019 07:39:34 UTC, Alexander Lyabah wrote:
>
> Hi guys,
>
> I found out that official django container is deprecated. Why you don't 
> want to support it?
>
> When you search "django" in Python subreddit 
> https://monosnap.com/file/R3uAqdrcrtxjCyKgHhhe7B8lO3up5q
>
> you see "Flask has overtaken Django according to the 2018 JetBrains 
> Developer Survey" 
> https://www.reddit.com/r/Python/comments/ao5dml/flask_has_overtaken_django_according_to_the_2018/
>
> and the main point in this discussion that it is hard to start from 0 to 
> real project.
>
> That why I was surprised that you don't have a simple docker container 
> with configured django with apache or/and django with nginx . It can save 
> so much time for people who just want to launch a simple pet project with 3 
> visitors per week.
>
> Thank you, I love Django and wish you be better and bigger, have a great 
> week.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/db603927-bed9-4734-8e52-a0500c9d69e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Official Django Docker Container Deprecated

2019-02-26 Thread Florian Apolloner


On Tuesday, February 26, 2019 at 8:39:34 AM UTC+1, Alexander Lyabah wrote:
>
> I found out that official django container is deprecated. Why you don't 
> want to support it?
>

There was never one to begin with. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8d7f77ff-bb34-4724-abbd-f0c511898d0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.