尝试在ppc64le上创建Prometheus映像。 它在复制步骤(第7、8行)中显示错误
(附加Dockerfile)
ARG ARCH="ppc64le"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
ARG ARCH="ppc64le"
ARG OS="linux"
**COPY .build/${OS}-${ARCH}/prometheus /bin/prometheus**
**COPY .build/${OS}-${ARCH}/promtool /bin/promtool**
COPY documentation/examples/prometheus.yml /etc/prometheus/prometheus.yml
COPY console_libraries/ /usr/share/prometheus/console_libraries/
COPY consoles/ /usr/share/prometheus/consoles/
COPY LICENSE /LICENSE
COPY NOTICE /NOTICE
COPY npm_licenses.tar.bz2 /npm_licenses.tar.bz2
RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/
RUN mkdir -p /prometheus && \
chown -R nobody:nogroup etc/prometheus /prometheus
USER nobody
EXPOSE 9090
VOLUME [ "/prometheus" ]
WORKDIR /prometheus
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles" ]
执行make build
后,不会创建此/.build目录。因此,我正在使用Makefile,以便在生成二进制文件后自动创建此目录。例如,创建一个包含执行自动化指令的脚本文件,并在Makefile中沿构建目标进行提及。
因此,我想在Makefile中创建一个文件夹.build/linux-ppc64le/{prometheus binary}
,以便在我进行构建时自动构建该文件夹。如何实现?
Makefile链接-https://github.com/prometheus/prometheus/blob/master/Makefile