[英]How to install Zed Attack Proxy in an Alpine container
I have this Dockerfile
which is an alpine image and I need to install zaproxy
, I tried RUN apk add zaproxy
but it gives the following error:我有这个
Dockerfile
这是一个高山图像,我需要安装zaproxy
,我试过RUN apk add zaproxy
但它给出了以下错误:
ERROR: unsatisfiable constraints:
错误:不可满足的约束:
This is the Dockerfile
:这是
Dockerfile
:
FROM docker:18.09
RUN apk update
RUN wget https://releases.hashicorp.com/terraform/0.12.21/terraform_0.12.21_linux_amd64.zip
RUN unzip terraform_0.12.21_linux_amd64.zip && rm terraform_0.12.21_linux_amd64.zip
RUN mv terraform /usr/bin/terraform
RUN apk add zaproxy
Is there a way I can download the binary and put it somewhere without using apk
package manager?有没有一种方法可以下载二进制文件并将其放在某个地方而不使用
apk
package 管理器?
We have a variety of official ZAP ones as per https://www.zaproxy.org/docs/docker/about/ , the stable Docker file is https://github.com/zaproxy/zaproxy/blob/main/docker/Dockerfile-stable根据https://www.zaproxy.org/docs/docker/about/ ,我们有各种官方 ZAP,稳定的 Docker 文件是https://github.com/zaproxy/zaproxy/blob/main/docker/ Dockerfile-稳定
The official "bare" image uses alpine, check out the details here: https://github.com/zaproxy/zaproxy/blob/main/docker/Dockerfile-bare官方“裸”图像使用 alpine,查看详细信息: https://github.com/zaproxy/zaproxy/blob/main/docker/Dockerfile-bare
In particular to specifically answer your question:特别是专门回答你的问题:
Is there a way I can download the binary and put it somewhere without using apk package manager?
有没有一种方法可以下载二进制文件并将其放在某个地方而不使用 apk package 管理器?
# Download and expand the latest stable release
RUN curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmlstarlet sel -t -v //url |grep -i Linux | wget --content-disposition -i - -O - | tar zxv && \
mv ZAP*/* . && \
rm -R ZAP*
As for actual use:至于实际使用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.