Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/bci_build/package/appcontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,11 @@ def _get_nginx_kwargs(os_version: OsVersion):
"build_recipe_type": BuildType.DOCKER,
"extra_files": _NGINX_FILES,
"support_level": SupportLevel.L3,
"exposes_ports": [TCP(80)],
"exposes_ports": [TCP(8080)],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't just change this without a version bump.

"custom_end": f"""{version_check_lines}
# Modify the default Nginx config to listen on port 8080 and PID file location to a writable path
{DOCKERFILE_RUN} sed -i 's/listen *80;/listen 8080;/g' /etc/nginx/nginx.conf &&\\
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change for anyone using the container as is.

In my view, if you want to change the container port and user, you must provide your own nginx.conf file.

I would just downgrade the nginx process by setting the worker user to nginx.

sed -i 's|#pid /run/nginx.pid;|pid /tmp/nginx.pid;|' /etc/nginx/nginx.conf
{DOCKERFILE_RUN} mkdir /docker-entrypoint.d
COPY [1-3]0-*.sh /docker-entrypoint.d/
COPY docker-entrypoint.sh /usr/local/bin
Expand Down