Git Product home page Git Product logo

docker_awstats's People

Contributors

dependabot[bot] avatar derhecht avatar nitram84 avatar pabra avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker_awstats's Issues

OpenShift support / Run awstats as non-root

I would like to run your awstats image with OpenShift, but there are some compatibility issues with your image. With some modifications of your Dockerfile I managed to run awstats on OpenShift. There are three issues:

1.) For your envsubst approach write permission to the target file is required:

/usr/local/bin/entrypoint.sh: line 9: can't create /etc/awstats/awstats.conf: Permission denied

Adding this line would fix the issue:

RUN touch /etc/awstats/awstats.conf && chgrp 0 /etc/awstats/awstats.conf && chmod g=u /etc/awstats/awstats.conf

2.) Port must be > 1024

Another port > 1024 has to be set in /usr/local/apache2/conf/awstats_httpd.conf and /usr/local/apache2/conf/httpd.conf

A configurable port using envsubst would be possible, but the workaround 1.) must be used too. On the other side a fixed port in the container shouldn't be a problem - in your example you mapped the port to 3000 anyway.

3.) Write permission to the log folder is required:

[Wed Nov 29 20:20:22.370985 2023] [core:error] [pid 1:tid 140445461642056] (13)Permission denied: AH00099: could not create /usr/local/apache2/logs/httpd.pid.XXXXXX [Wed Nov 29 20:20:22.371008 2023] [core:error] [pid 1:tid 140445461642056] AH00100: httpd: could not log pid to file /usr/local/apache2/logs/httpd.pid

Adding this line would fix the issue:

RUN chgrp -R 0 /usr/local/apache2/logs/ && chmod -R g=u /usr/local/apache2/logs/

With these modifications your image could be used with OpenShift. Would you accept patches to support OpenShift? If yes, what would be your preferred way to fix the port issue? A fixed port e.g. 3000 ( -> breaking change ) or a configurable port (default 80) with envsubst ( -> workaround has to be used for each file with substitutions ).

Edit:

Steps to reproduce without OpenShift:

docker run -u 12345:0 pabra/awstats

Please make full year view configurable

Full year view is disabled for cgi by default (AllowFullYearView=2) and this option can't be configured with an environment variable now. Please make this option configurable with an environment variable (default set to "2"). This would help a lot.

Thank you very much!

Use tags to avoid caching

When using your brilliant Docker container your have to use the "latest" tag (or none which defaults to latest). This is not good as it is cached and you net to run Docker with "--clear-cache" to ensure you have the latest version.

Could you please add tags (in Docker Hub) e.g. at least one for the current awstats 7.7 version (and of curse update it, when changes on version 7.7 appears)?

Error while building the image

Hello,

I tried to build the image, but it seems the perl module version 2.0.11 is missing.

--2022-02-22 11:27:39--  https://downloads.apache.org/perl/mod_perl-2.0.11.tar.gz
Resolving downloads.apache.org (downloads.apache.org)... 135.181.214.104, 88.99.95.219, 2a01:4f8:10a:201a::2, ...
Connecting to downloads.apache.org (downloads.apache.org)|135.181.214.104|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-22 11:27:39 ERROR 404: Not Found.

Cannot build Docker Image because apache2-mod-perl missing in Alpine

Could not build the Dockerfile, due to a problem with apache2-mod-perl package
not being available in recent Alpine Linux versions. See under
http://dl-cdn.alpinelinux.org/alpine/ e.g. http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/

Build output:

docker build -t pabra/awstats:latest .
Sending build context to Docker daemon  166.4kB
Step 1/12 : FROM httpd:2.4.33-alpine
 ---> 73a557ff177a
Step 2/12 : ENV AWSTATS_VERSION 7.6-r2
 ---> Running in 57904c994b8a
Removing intermediate container 57904c994b8a
 ---> 24e07e962b43
Step 3/12 : RUN apk add --no-cache awstats=${AWSTATS_VERSION} gettext     && echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories     && apk add --no-cache apache2-mod-perl     && echo 'Include conf/awstats_httpd.conf' >> /usr/local/apache2/conf/httpd.conf
 ---> Running in fec2ccaa1cd7
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing perl-uri (1.71-r1)
(2/6) Installing awstats (7.6-r2)
(3/6) Installing libgomp (6.4.0-r5)
(4/6) Installing libintl (0.19.8.1-r1)
(5/6) Installing libunistring (0.9.7-r0)
(6/6) Installing gettext (0.19.8.1-r1)
Executing busybox-1.27.2-r11.trigger
OK: 100 MiB in 60 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  apache2-mod-perl (missing):
    required by: world[apache2-mod-perl]
The command '/bin/sh -c apk add --no-cache awstats=${AWSTATS_VERSION} gettext     && echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories     && apk add --no-cache apache2-mod-perl     && echo 'Include conf/awstats_httpd.conf' >> /usr/local/apache2/conf/httpd.conf' returned a non-zero code: 1

Also tried httpd:2.4.41-alpine.

(ansible-python2.7) nusa:docker_awstats.git just$ docker build -t pabra/awstats:latest .
Sending build context to Docker daemon  166.4kB
Step 1/12 : FROM httpd:2.4.41-alpine
 ---> 141bb8d01fbd
Step 2/12 : ENV AWSTATS_VERSION 7.6-r2
 ---> Running in 0731fe732cb5
Removing intermediate container 0731fe732cb5
 ---> 89adca07727b
Step 3/12 : RUN apk add --no-cache awstats=${AWSTATS_VERSION} gettext     && echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories     && apk add --no-cache apache2-mod-perl     && echo 'Include conf/awstats_httpd.conf' >> /usr/local/apache2/conf/httpd.conf
 ---> Running in ed7c71f85e35
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  awstats-7.7-r0:
    breaks: world[awstats=7.6-r2]
The command '/bin/sh -c apk add --no-cache awstats=${AWSTATS_VERSION} gettext     && echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories     && apk add --no-cache apache2-mod-perl     && echo 'Include conf/awstats_httpd.conf' >> /usr/local/apache2/conf/httpd.conf' returned a non-zero code: 1

The problem is described here.

I am working on a version based on httpd:2.4.41 base Image, which is based on Debian Buster-Slim, but gives much bigger Image size (about 248MB uncompressed). If it works out I'll make it available on GitHub https://github.com/justb4/docker-awstats.

Configure SkipFiles

Is it possible to configure SkipFiles as an environment variable ?
I can solve by mounting by own copy of the awstats_env.conf but was wondering if there is another solution.
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.