Coder Social home page Coder Social logo

aws-eb-python-dockerfiles's Introduction

#aws-eb-python-dockerfiles

#####This is the Python Dockerfile repository for AWS Elastic Beanstalk.

See also https://aws.amazon.com/elasticbeanstalk/

##LICENSE

Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

aws-eb-python-dockerfiles's People

Contributors

zhengyal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-eb-python-dockerfiles's Issues

apt-get update Fails

this is the resulting error
W: There is no public key available for the following key IDs: 9D6D8F6BC857C906


Step 2/16 : RUN apt-get update &&     apt-get install -y --no-install-recommends             build-essential             gettext             git             libffi-dev             libjpeg-dev             libmemcached-dev             libpq-dev             libssl-dev             libxml2-dev             libxslt1-dev             locales             nginx             python-dev             python-virtualenv             python3-dev             sudo             supervisor             zlib1g-dev &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* &&     dpkg-reconfigure locales && 	locale-gen C.UTF-8 && 	/usr/sbin/update-locale LANG=C.UTF-8 &&     mkdir /etc/pretix &&     mkdir /data &&     useradd -ms /bin/bash -d /pretix -u 15371 pretixuser &&     echo 'pretixuser ALL=(ALL) NOPASSWD: /usr/bin/supervisord' >> /etc/sudoers &&     mkdir /static

 ---> Running in ce9daa6fe1d6

Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]

Ign http://http.debian.net jessie InRelease

Ign http://http.debian.net jessie-updates InRelease

Get:2 http://http.debian.net jessie Release.gpg [2420 B]

Ign http://http.debian.net jessie-updates Release.gpg

Get:3 http://http.debian.net jessie Release [148 kB]

Ign http://http.debian.net jessie-updates Release

Get:4 http://security.debian.org jessie/updates/main amd64 Packages [825 kB]

Get:5 http://http.debian.net jessie/main amd64 Packages [9098 kB]

Err http://http.debian.net jessie-updates/main amd64 Packages
  

Err http://http.debian.net jessie-updates/main amd64 Packages
  

Err http://http.debian.net jessie-updates/main amd64 Packages
  

Err http://http.debian.net jessie-updates/main amd64 Packages
  404  Not Found

Fetched 10.1 MB in 8s (1190 kB/s)

W: There is no public key available for the following key IDs:
9D6D8F6BC857C906
W: Failed to fetch http://http.debian.net/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.```

Missing buffer size option for wsgi lead to 502

When deploying a Flask app to EBS (using the tutorial) one can face 502 HTTP status code when returning response with a size bigger than 4096.

invalid request block size: 4654 (max 4096)...skip

Apparently this script does not contemplate to configure the buffer-size option for WSGI.
After reading the doc about configuration on EBS I am not sure if I can specify such an option without doing a hacky replace of the uwsgi-start.sh script and rerun it.

WSGI_PATH egrep matches .pyc files

Referring to this line:
https://github.com/aws/aws-eb-python-dockerfiles/blob/master/3.4.2-aws-eb-onbuild/uwsgi-start.sh#L9

WSGI_PATH=`find /var/app | egrep '/var/app/[^/]+/wsgi.py'`

If you run the command after .pyc have been compiled you get the results:

./mysite/wsgi.py
./mysite/wsgi.pyc

Which means the uwsgi command is set as:

uwsgi --http :8080 --wsgi-file mysite/wsgi.py mysite/wsgi.pyc

Which obviously fails. Ideally two things need to be updated:

  1. Readme/instructions to clearly state .dockerignore file should contain .pyc (so pyc files aren't copied across)

  2. Original command should be updated (to not match pyc files) e.g.

    WSGI_PATH=find /var/app | egrep '/var/app/[^/]+/wsgi.py$'

WSGI_PATH check multiple levels to find wsgi.py

In addition would be great if your base image support multiple folder depths. wsgi.py is not always located one level deep. Especially if you have multiple django apps, you may want a command such as:

WSGI_PATH=`find /var/app | egrep 'wsgi.py'`

This would allow more projects based on this docker image, using a project structure such as:

/backend
    /polls
    /mysite
        wysgi.py
/frontend
    gulpfile.js
    package.json
    /src

Thanks!

Docker Files

Wondering if there is a docker that works with python.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.