-
Notifications
You must be signed in to change notification settings - Fork 550
Thumbor 6.5.2 #45
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
Thumbor 6.5.2 #45
Changes from all commits
eba5093
36d4640
b750ff4
daa9d3b
0fd15e5
ffcdbec
48aaef3
d14a347
c1bb993
a2e9c4c
79b7521
36c7d3f
7d51222
58882ef
4e23e8a
3387878
58948c6
9800e89
110d6a0
844a73a
33e08e8
3627e5a
6bbc037
0462412
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deployment/dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM amazonlinux:2017.03.1.20170812 | ||
|
||
# lock yum to the same repository version | ||
RUN sed -i 's/releasever=.*/releasever=2017.03/g' /etc/yum.conf | ||
|
||
# base requirements | ||
RUN yum install yum-utils zip -y && \ | ||
yum-config-manager --enable epel && \ | ||
yum install wget git libpng-devel libcurl-devel gcc python27-devel libjpeg-devel -y | ||
|
||
# enable epel on Amazon Linux 2 | ||
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
|
||
# ImageMagick | ||
RUN yum install -y ImageMagick-devel | ||
|
||
# Other libraries | ||
RUN yum install -y pngcrush libjpeg* gifsicle | ||
|
||
# optipng | ||
RUN wget http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/o/optipng-0.7.6-6.el6.x86_64.rpm && \ | ||
yum localinstall optipng-0.7.6-6.el6.x86_64.rpm -y && rm optipng*rpm | ||
|
||
# pngquant | ||
RUN wget http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/l/libimagequant-2.5.2-5.el6.x86_64.rpm && \ | ||
yum localinstall libimagequant-2.5.2-5.el6.x86_64.rpm -y && rm libimagequant*rpm && \ | ||
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/p/pngquant-2.5.2-5.el6.x86_64.rpm && \ | ||
yum localinstall pngquant-2.5.2-5.el6.x86_64.rpm -y && rm pngquant*rpm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was not able to find
When I didn't have these dependencies, the output would say something to the effect of |
||
|
||
# pip | ||
RUN alias sudo='env PATH=$PATH' && \ | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python get-pip.py && rm get-pip.py && \ | ||
pip install --upgrade setuptools && \ | ||
pip install --upgrade virtualenv | ||
|
||
# pycurl | ||
RUN yum install -y nss-devel | ||
ENV PYCURL_SSL_LIBRARY=nss | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
RUN mkdir /lambda | ||
VOLUME /lambda | ||
WORKDIR /lambda/deployment | ||
|
||
ENTRYPOINT ["./build-s3-dist.sh"] | ||
CMD ["source-bucket-base-name"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This defaults the bucket to |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# coding: utf-8 | ||
|
||
from setuptools import setup, find_packages | ||
from pip.req import parse_requirements | ||
from pip._internal.req import parse_requirements | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
setup( | ||
name='image_handler_custom_resource', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,7 +213,7 @@ def request_thumbor(original_request, session): | |
|
||
def process_thumbor_responde(thumbor_response, vary): | ||
if thumbor_response.status_code != 200: | ||
return response_formater(status_code=response.status_code) | ||
return response_formater(status_code=thumbor_response.status_code) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe using I believe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this was fixed in #34 as well |
||
if vary: | ||
vary = thumbor_response.headers['vary'] | ||
content_type = thumbor_response.headers['content-type'] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# coding: utf-8 | ||
|
||
from setuptools import setup, find_packages | ||
from pip.req import parse_requirements | ||
from pip._internal.req import parse_requirements | ||
|
||
tests_require = [ | ||
'mock', | ||
|
@@ -23,11 +23,11 @@ | |
'': ['*.conf'], | ||
}, | ||
install_requires=[ | ||
'botocore==1.3.7', | ||
'tornado_botocore==1.0.2', | ||
'botocore==1.8', | ||
'tornado_botocore==1.3.2', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'requests_unixsocket>=0.1.5', | ||
'thumbor>=6.4.2', | ||
'tc_aws==6.0.3', | ||
'thumbor>=6.5.2', | ||
'tc_aws==6.2.10', | ||
'opencv-python==3.2.0.6' | ||
], | ||
extras_require={ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the build is repeatable, I locked the
releasever
to2017.03
vs. latest. In particular, the issue was when building thepycurl
library from source since that when youyum install libcurl-devel
if it pulls latest, when the lambda function runs you get an error that the linked version oflibcurl
differs from the compiled version oflibcurl
.To get around that, I just pinned the
yum
repository to that version.