-
Notifications
You must be signed in to change notification settings - Fork 26
Dockerfile: changing to non-privileged port #30
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
Changes from all commits
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ubuntu:16.04 | ||
FROM ubuntu:14.04 | ||
MAINTAINER Bryan Latten <latten@adobe.com> | ||
|
||
# Use in multi-phase builds, when an init process requests for the container to gracefully exit, so that it may be committed | ||
|
@@ -48,7 +48,8 @@ COPY ./container/root / | |
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / && \ | ||
rm /tmp/s6-overlay-amd64.tar.gz | ||
|
||
EXPOSE 80 | ||
# Using a non-privileged port to prevent having to use setcap internally | ||
EXPOSE 8080 | ||
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. Do we need to modify this in Flight Director to make sure it matches this new port? across whichever apps are running from this parent container? 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. yes - when we roll it out. I will make this a major change (5.0) 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. Excellent. Just checking. |
||
|
||
# NOTE: intentionally NOT using s6 init as the entrypoint | ||
# This would prevent container debugging if any of those service crash | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
server { | ||
listen 80; | ||
listen 8080; | ||
|
||
# Doesn't broadcast version level of server software | ||
server_tokens off; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ if [ $CONTAINER_ROLE == 'web' ] | |
then | ||
echo '[run] enabling web server' | ||
|
||
# Unfortunately, until Dockerhub supports this operation...it has to be done here | ||
setcap cap_net_bind_service=+ep /usr/sbin/nginx | ||
|
||
# Enable nginx as a supervised service | ||
if [ -d /etc/services.d/nginx ] | ||
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. dockerhub couldn't run this command, neither can docker 1.11 by default 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. Is this just an option that needs to run via 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. its something that allows you to run on privileged port without root on nginx 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. Got it, cool |
||
then | ||
|
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.
rolling back, wasn't helpful downstream