-
Notifications
You must be signed in to change notification settings - Fork 122
Build and use custom nginx container #934
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
Merged
kate-osborn
merged 30 commits into
nginx:main
from
kate-osborn:feat/build-custom-nginx-image
Aug 10, 2023
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
de0330e
Custom nginx container
0ff01e9
Fix yaml lint error
c2e963b
Fix unit test
42a37b0
Remove docker bind mounts
861340b
Add build args to ci
07dda1d
Don't use matrix for helm
89a716d
Access elements of list in install chart
d714148
Kind load multiple images on one line
3052f04
Add separate docker meta step for nginx image
2f0177c
Don't pull images for helm install
9851e77
Uninstall setcap
6edafd7
Change makefile target name
f8d50f8
Remove i from setcap command
e3e147b
build-nkg-images -> build-images
459f1ec
Update makefile help output in readme
462dd1e
Reduce nginx container permissions
1b78410
Update readme
1e9f144
Fix link
bb7b262
Add go as a prereq to building images
5b47519
Move pid file to new volume
106df3a
Try fixing trivy error
438fae4
Add nginx image to conformance ci yaml
eb08aba
Fix meta ref
2e205d9
Update architecture doc and diagram
ae5cf72
Fix nginx-run volume name
48e8912
Remove STOPSIGNAL from dockerfile
e8f0c58
Workflow changes
318c72d
Fix dockerfile typos
6efadee
Fix sarif file typos
ef3bc13
Update apk
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM nginx:1.25.1-alpine | ||
|
||
ARG NJS_DIR | ||
ARG NGINX_CONF_DIR | ||
|
||
RUN apk update && apk add --no-cache libcap \ | ||
&& mkdir -p /var/lib/nginx /usr/lib/nginx/modules \ | ||
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ | ||
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx \ | ||
&& apk del libcap | ||
|
||
COPY ${NJS_DIR}/httpmatches.js /usr/lib/nginx/modules/njs/httpmatches.js | ||
COPY ${NGINX_CONF_DIR}/nginx.conf /etc/nginx/nginx.conf | ||
|
||
RUN chown -R 101:1001 /etc/nginx /var/cache/nginx /var/lib/nginx | ||
|
||
USER 101:1001 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.