我正在基于标准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
我错过了什么?
答案 0 :(得分:1)
您收到的警告和配置脚本中的错误无关。
警告只是表明您传递的标志无效,而错误表示您在构建路径中缺少依赖项。
在这种特定情况下,您缺少tap
标题。您需要安装linux-headers
包。
顺便说一句,您还缺少其他一些openVPN构建依赖项:
总而言之,您需要编辑Dockerfile的第三个命令,如下所示:
RUN apk add --update --no-cache \
file \
make \
gcc \
g++ \
python \
wget \
linux-headers \
openssl-dev \
lzo-dev \
linux-pam-dev
你应该好好去