-
Notifications
You must be signed in to change notification settings - Fork 182
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
Update Dockerfile for Python 3 etc (#1047) #1055
Conversation
Update Dockerfile to use Python3 and correctly pull in dependencies. Also, create a separate SmokeDetector user instead of running as root. * Remove obsolete MAINTAINER direcive * Ubuntu provides python3-pip so no need to separately wget pip * Install SmokeDetector with a virtualenv so that tld can be updated by SmokeDetector * The image starts up with su - SmokeDetector by default
Dockerfile
Outdated
adduser --disabled-password --force-badname SmokeDetector \ | ||
--gecos SmokeDetector && \ | ||
su - SmokeDetector sh -c '\ | ||
env GIT_SSL_NO_VERIFY=true git clone https://github.com/Charcoal-SE/SmokeDetector.git && \ |
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.
Why GIT_NO_SSL_VERIFY
?
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.
I just copy/pasted it from the old Dockerfile
but you get weird errors from git
if you don't have the full certificate chain for SSL verification. I'd imagine installing the ca-certificates
package would fix that more properly. Thanks for inquiring; I'll see if I can get rid of that.
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.
@tripleee Any updates on that? Because I'd rather use valid SSL, not invalid SSL. (ca-certificates
is important after all to have so Smokey when it runs doesn't blow up on bad SSL)
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.
Try and get ca-certificates
installed so we don't need to use the SSL_NO_VERIFY
, and instead verify valid SSL.
Dockerfile
Outdated
adduser --disabled-password --force-badname SmokeDetector \ | ||
--gecos SmokeDetector && \ | ||
su - SmokeDetector sh -c '\ | ||
env GIT_SSL_NO_VERIFY=true git clone https://github.com/Charcoal-SE/SmokeDetector.git && \ |
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.
@tripleee Any updates on that? Because I'd rather use valid SSL, not invalid SSL. (ca-certificates
is important after all to have so Smokey when it runs doesn't blow up on bad SSL)
And remove the now obsolete GIT_SSL_NO_VERIFY=true from git clone
Sorry for dropping the ball on this. I have now updated the The resulting image is still quite large. I'd be tempted to refactor it to use Alpine instead of Ubuntu but that's a separate effort, and also depends on what the image is supposed to be used for. |
Codecov Report
@@ Coverage Diff @@
## master #1055 +/- ##
==========================================
+ Coverage 63.8% 63.84% +0.04%
==========================================
Files 6 6
Lines 1768 1770 +2
==========================================
+ Hits 1128 1130 +2
Misses 640 640
Continue to review full report at Codecov.
|
I struggled to find out how to mark the requested change as implemented. I guess the protocol is for @teward to approve the change. |
Update Dockerfile to use Python3 and correctly pull in dependencies. (#1047)
Also, create a separate SmokeDetector user instead of running as root.
wget
piptld
can be updated by SmokeDetectorsu - SmokeDetector
by defaultRUN
directive