Closed Proka88MPH closed 3 years ago
Perhaps the git repo was cloned without submodules (i.e. without the --recurse-submodules
argument)? For already cloned repositories you can do:
git submodule update --init
You can also use the pre-built hosted image on GitHub Container Registry, which may be easier than manually building the Docker image. For example:
FROM ghcr.io/weserv/images:5.x
# Update RPM packages
RUN dnf update -y
# Overwrite default nginx config
# For example, change DNS settings:
# https://github.com/weserv/images/issues/206#issuecomment-567015037
# Or default user agent:
# https://github.com/weserv/images/issues/223#issuecomment-616219620
# etc, etc:
# https://github.com/weserv/images/tree/5.x/ngx_conf
COPY imagesweserv.conf /etc/nginx
Can we remove Weserv's website from the public Docker image? In most cases, I don't need that site for public access.
Weserv's website can be provided via another image based on the public Docker image.
@giautm I don't intend to remove the weserv/docs
submodule from the pre-built Docker image, because that would break compatibility for existing users who want our documentation to be served.
If you want a custom page served, I recommend extending it from the pre-built Docker image, for example:
FROM ghcr.io/weserv/images:5.x
ARG NGINX_DEFAULT=https://github.com/nginx/nginx/raw/master/docs/html/index.html
# Use nginx's default page
RUN mv public public-old \
&& mkdir public \
&& chown -R nginx:nginx public \
&& curl -L $NGINX_DEFAULT -o public/index.html
@kleisauke : Hi, I don't want to break compatibility for anyone. But, I think weserv should have a base image with default Nginx (for production ready) and the module weserv only.
The current image ghcr.io/weserv/images:5.x
can be re-created based on that.
@giautm Ah, I think I misunderstood your question. Are you referring to dynamic nginx modules? If so, I'm currently working on that in our weserv/rpms
repository, see the nginx-mod-weserv
branch. This allows users to install nginx and the weserv module with just dnf install nginx nginx-mod-weserv
on RHEL 9 (and its derivatives).
This can be tested with this Dockerfile:
Edit: updated for use with RHEL 9 (and its derivatives).
I hope this information helped. Please feel free to re-open with more details if further assistance is required.
Hi, We are trying to build and run docker in Kubernetes but we are getting following error: var/www/imagesweserv/public/service-worker.js" failed (2: No such file or directory)
There is noting in this folder var/www/imagesweserv/public/
We have followed instructions for building docker image. Do you have any advice?