Comments (8)
Windows 10 + Docker Desktop 4.21.1 (114176):
- building locally:
- running with custom ports using docker command:
It works correctly.
from docker-nginx-unprivileged.
Additional info:
We had issue with "schema 2" when trying to build our new nginx based docker image on RHEL7 1.13.1, so we updated the builder machine to the one above.
from docker-nginx-unprivileged.
Maybe a clarification:
We used multiple nginxinc/nginx-unprivileged images in "network mode: host" together.
It didn't try to open any other port than specified in the nginx_template.conf's listen,
but now it wants to open the 8080 port on the host for every nginx image based container with the same setup, therefore it lets only one run, and the rest are denied. What could have changed that causing this?
from docker-nginx-unprivileged.
Considering the answer of meyay here: https://forums.docker.com/t/how-do-i-unexpose-ports/67863
in host mode the EXPOSE directive in the Dockerfile opens the port. And there is no way to remove/overwrite this directive by a new Dockerfile layer.
from docker-nginx-unprivileged.
I tried with truncating the default.conf in our dockerfile. It gave me the result on the rhel7 using 1.13.1 docker:
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Ignoring /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh, not executable
/docker-entrypoint.sh: Ignoring /docker-entrypoint.d/15-local-resolvers.envsh, not executable
/docker-entrypoint.sh: Ignoring /docker-entrypoint.d/20-envsubst-on-templates.sh, not executable
/docker-entrypoint.sh: Ignoring /docker-entrypoint.d/30-tune-worker-processes.sh, not executable
/docker-entrypoint.sh: Configuration complete; ready for start up
But on Windows with Docker Desktop 4.24.2 it gave me a working result:
2023-10-20T08:47:03.596197000Z /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
2023-10-20T08:47:03.597089200Z /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
2023-10-20T08:47:03.598042800Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
2023-10-20T08:47:03.603580500Z 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
2023-10-20T08:47:03.616023200Z 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
2023-10-20T08:47:03.616382100Z /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
2023-10-20T08:47:03.616828200Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2023-10-20T08:47:03.626551600Z 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/nginx.conf.template to /etc/nginx/nginx.conf
2023-10-20T08:47:03.630479800Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2023-10-20T08:47:03.632278500Z /docker-entrypoint.sh: Configuration complete; ready for start up
So it didn't processed the template on the rhel7 machine, therefore it is not working correctly: /etc/nginx/nginx.conf stays the default one.
from docker-nginx-unprivileged.
stepping into the container, all look executable for all users:
-rwxr-xr-x 1 root root 2.1K Oct 16 00:06 10-listen-on-ipv6-by-default.sh
-rwxr-xr-x 1 root root 276 Oct 16 00:06 15-local-resolvers.envsh
-rwxr-xr-x 1 root root 3.0K Oct 16 00:06 20-envsubst-on-templates.sh
-rwxr-xr-x 1 root root 4.6K Oct 16 00:06 30-tune-worker-processes.sh
from docker-nginx-unprivileged.
See nginxinc/docker-nginx#319 for the discussion and rationale.
Also, see moby/moby#3465 for a relevant moby discussion.
from docker-nginx-unprivileged.
Closing this given that per the above issue threads, this is a "feature" of Docker.
You should be able to side step this issue by extending this image and doing something similar to what this comment details moby/moby#3465 (comment)
from docker-nginx-unprivileged.
Related Issues (20)
- Please add bookworm-stable tag with current stable version based on Debian 12 HOT 5
- Non-container guide HOT 2
- Allow contaiener root user to start nginx process and its workers when used in rootless podman HOT 1
- Publish image to a registry that is not rate-limited HOT 4
- Add `;` in readme for Line 35
- Update image to mitigate CVE-2023-44487 vulnerability HOT 3
- Improve local testing docs
- Does image build include installing security updates? HOT 1
- Add another common issue to the README section
- proxy_bind transparent whithout root user HOT 1
- Clarify how to use the different base image versions. HOT 1
- Alpine 3.19 Upgrade HOT 1
- Stable Perl images using mainline nginx? HOT 1
- Upgrade Base Image of nginxinc/docker-nginx-unprivileged from stable-bullseye to stable-bookworm HOT 6
- Container images pushed to Dockerhub are changing checksums without changing version HOT 3
- nginxplus version HOT 2
- Images with tags fixing alpine versions are missing HOT 2
- Pack and run Vue Application based on nginx-unprivileged in Kubernetes HOT 3
- CVE-2023-50387 in systemd 252.22 in nginxinc/nginx-unprivileged:latest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nginx-unprivileged.