如何解决错误"无法识别的选项: - enable-password-save"在alpine linux下构建openvpn时?

时间:2017-08-22 06:13:57

标签: docker openvpn alpine

我正在基于标准openvpn图片的Docker容器中构建自定义node-alpine客户端。

(修剪过的)泊坞窗图像如下所示:

FROM node:8.4-alpine
MAINTAINER: Dave <redacted@redacted.redacted>

RUN apk add --update --no-cache \
    file \
    make \
    gcc \
    g++ \
    python \
    wget

# install openVPN

RUN wget https://swupdate.openvpn.org/community/releases/openvpn-2.4.3.tar.gz --no-check-certificate
RUN gunzip openvpn-2.4.3.tar.gz
RUN tar -xvf openvpn-2.4.3.tar

WORKDIR openvpn-2.4.3
RUN ./configure --enable-password-save
RUN make
RUN make install

# ... the rest of the file

当我构建这个时,我收到错误

configure: WARNING: unrecognized options: --enable-password-save

然后在

失败之前检查会持续一段时间
checking whether TUNSETPERSIST is declared... no
configure: error: no tap header could be found

我错过了什么?

1 个答案:

答案 0 :(得分:1)

您收到的警告和配置脚本中的错误无关。

警告只是表明您传递的标志无效,而错误表示您在构建路径中缺少依赖项。

在这种特定情况下,您缺少tap标题。您需要安装linux-headers包。

顺便说一句,您还缺少其他一些openVPN构建依赖项:

  • 的OpenSSL-dev的
  • LZO-dev的
  • Linux-PAM的-dev的

总而言之,您需要编辑Dockerfile的第三个命令,如下所示:

RUN apk add --update --no-cache \
    file \
    make \
    gcc \
    g++ \
    python \
    wget \
    linux-headers \
    openssl-dev \
    lzo-dev \
    linux-pam-dev

你应该好好去