【发布时间】:2026-01-01 17:55:01
【问题描述】:
我需要为 Apacher 服务器安装 Cosign 过滤器。
我需要使用来自 Confluence 的这个 cosign-filter,但是当我的安装点击 ./configure 时,它会抛出错误:
ERROR: Unknown instruction: --ENABLE-APACHE2=/PATH/TO/APACHE2/BIN/APXS
然后我发现了这个installation 用于 github 存储库的 cosign 过滤器,因为我在我的 Docker 容器中使用了ubuntu16.04,所以我发现它更有用,但是在这个安装中我遇到了autoconf 的问题,所以当他点击RUN autoconf 会引发此错误:
autoconf: error: no input file
ERROR: Service 'web' failed to build: The command '/bin/sh -c autoconf' returned a non-zero code: 1
当他点击RUN ./configure --enable-apache2= which apx时会发生第二个错误,它会抛出这个错误:
Step 19/35 : RUN ./configure --enable-apache2=`which apxs`
---> Running in 1e9f870df22f
/bin/sh: 1: ./configure: not found
ERROR: Service 'web' failed to build: The command '/bin/sh -c ./configure --enable-apache2=`which apxs`' returned a non-zero code: 127
Dockerfile 配置:
FROM ubuntu:16.04
FROM python:3.5
ENV PYTHONUNBUFFERED 1
RUN cat /etc/passwd
RUN cat /etc/group
RUN apt-get update && apt-get install -y \
apache2 \
apache2-dev \
libapache2-mod-wsgi-py3 \
autoconf \
libssl-dev
RUN apt-get install -y openssl
RUN mkdir /var/run/sshd
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# The Umich IAM copy of Cosign includes Apache 2.4 support
RUN wget https://github.com/umich-iam/cosign/archive/master.tar.gz
RUN tar xfz master.tar.gz
RUN cd cosign-master
RUN autoconf
RUN ./configure --enable-apache2=`which apxs`
RUN make
RUN make isntall
RUN mkdir -p /var/cosign/filter
RUN chown www-data:www-data /var/cosign/filter
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code
EXPOSE 80
# Update the default apache site with the config we created.
COPY 000-default.conf /etc/apache2/sites-enabled/000-default.conf
RUN chown -R root:www-data /var/www
RUN chmod u+rwx,g+rx,o+rx /var/www
RUN find /var/www -type d -exec chmod u+rwx,g+rx,o+rx {} +
RUN find /var/www -type f -exec chmod u+rw,g+rw,o+r {} +
#essentially: CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]
CMD ["/tmp/start.sh"]
那么有什么办法可以解决这个问题,以便我可以安装和配置这个过滤器,谢谢。
【问题讨论】:
标签: apache docker docker-compose ubuntu-16.04