feiyu563 / PrometheusAlert

Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等
https://feiyu563.gitbook.io
MIT License
2.81k stars 676 forks source link

docker 构建镜像失败 #375

Open Yang-yang-y opened 7 months ago

Yang-yang-y commented 7 months ago

Sending build context to Docker daemon 733.9MB Step 1/20 : FROM golang:1.20.6-alpine3.18 as builder ---> bf7808b93c00 Step 2/20 : WORKDIR $GOPATH/src/github.com/feiyu563/PrometheusAlert ---> Using cache ---> bce80a978504 Step 3/20 : RUN apk update && apk add --no-cache gcc g++ sqlite-libs make git ---> Using cache ---> 99357ae538bf Step 4/20 : ENV GO111MODULE on ---> Using cache ---> 5a3ff2df7614 Step 5/20 : ENV GOPROXY https://goproxy.io ---> Using cache ---> ddcb19f04652 Step 6/20 : COPY . $GOPATH/src/github.com/feiyu563/PrometheusAlert ---> Using cache ---> 7ba63b8a70be Step 7/20 : RUN make build ---> Running in 4dfbd4e2c2cd make: git: Operation not permitted make: git: Operation not permitted make: whoami: Operation not permitted make: hostname: Operation not permitted make: date: Operation not permitted make: /bin/sh: Operation not permitted make: /bin/sh: Operation not permitted make: *** [Makefile:34: /go/src/github.com/feiyu563/PrometheusAlert//PrometheusAlert] Error 127 The command '/bin/sh -c make build' returned a non-zero code: 2

Yang-yang-y commented 7 months ago

Sending build context to Docker daemon 733.9MB Step 1/20 : FROM golang:1.20.6-alpine3.18 as builder 1.20.6-alpine3.18: Pulling from library/golang 31e352740f53: Pull complete 7f9bcf943fa5: Pull complete 9fd371fdf0be: Pull complete add974993529: Pull complete Digest: sha256:7839c9f01b5502d7cb5198b2c032857023424470b3e31ae46a8261ffca72912a Status: Downloaded newer image for golang:1.20.6-alpine3.18 ---> bf7808b93c00 Step 2/20 : WORKDIR $GOPATH/src/github.com/feiyu563/PrometheusAlert ---> Running in d476aaa45255 Removing intermediate container d476aaa45255 ---> bce80a978504 Step 3/20 : RUN apk update && apk add --no-cache gcc g++ sqlite-libs make git ---> Running in 2cbf17fc8c5d fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz v3.18.6-45-g8a53ccbc4c1 [https://dl-cdn.alpinelinux.org/alpine/v3.18/main] v3.18.6-51-g0d03edd5723 [https://dl-cdn.alpinelinux.org/alpine/v3.18/community] OK: 20077 distinct packages available fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz (1/26) Upgrading musl (1.2.4-r0 -> 1.2.4-r2) (2/26) Installing libgcc (12.2.1_git20220924-r10) (3/26) Installing libstdc++ (12.2.1_git20220924-r10) (4/26) Installing libstdc++-dev (12.2.1_git20220924-r10) (5/26) Installing zstd-libs (1.5.5-r4) (6/26) Installing binutils (2.40-r7) (7/26) Installing libgomp (12.2.1_git20220924-r10) (8/26) Installing libatomic (12.2.1_git20220924-r10) (9/26) Installing gmp (6.2.1-r3) (10/26) Installing isl26 (0.26-r1) (11/26) Installing mpfr4 (4.2.0_p12-r0) (12/26) Installing mpc1 (1.3.1-r1) (13/26) Installing gcc (12.2.1_git20220924-r10) (14/26) Installing musl-dev (1.2.4-r2) (15/26) Installing libc-dev (0.7.2-r5) (16/26) Installing g++ (12.2.1_git20220924-r10) (17/26) Installing brotli-libs (1.0.9-r14) (18/26) Installing libunistring (1.1-r1) (19/26) Installing libidn2 (2.3.4-r1) (20/26) Installing nghttp2-libs (1.57.0-r0) (21/26) Installing libcurl (8.5.0-r0) (22/26) Installing libexpat (2.6.0-r0) (23/26) Installing pcre2 (10.42-r1) (24/26) Installing git (2.40.1-r0) (25/26) Installing make (4.4.1-r1) (26/26) Installing sqlite-libs (3.41.2-r3) Executing busybox-1.36.1-r0.trigger OK: 246 MiB in 41 packages Removing intermediate container 2cbf17fc8c5d ---> 99357ae538bf Step 4/20 : ENV GO111MODULE on ---> Running in 34a24594033a Removing intermediate container 34a24594033a ---> 5a3ff2df7614 Step 5/20 : ENV GOPROXY https://goproxy.io ---> Running in 3a9175aa5d30 Removing intermediate container 3a9175aa5d30 ---> ddcb19f04652 Step 6/20 : COPY . $GOPATH/src/github.com/feiyu563/PrometheusAlert ---> 7ba63b8a70be Step 7/20 : RUN make build ---> Running in 115fd9469fa5 make: git: Operation not permitted make: git: Operation not permitted make: whoami: Operation not permitted make: hostname: Operation not permitted make: date: Operation not permitted make: /bin/sh: Operation not permitted make: /bin/sh: Operation not permitted make: *** [Makefile:34: /go/src/github.com/feiyu563/PrometheusAlert//PrometheusAlert] Error 127 The command '/bin/sh -c make build' returned a non-zero code:

Yang-yang-y commented 7 months ago

Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:22:34 2019 OS/Arch: darwin/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:29:19 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683

平台macos 是因为go版本不一致?

Zhang21 commented 7 months ago

权限不足

make: git: Operation not permitted
make: git: Operation not permitted
make: whoami: Operation not permitted
make: hostname: Operation not permitted
make: date: Operation not permitted
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
Yang-yang-y commented 7 months ago

我试了下 docker 版本问题

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Leslie Zhang @.> 发送时间: 2024年2月26日 15:35 收件人: feiyu563/PrometheusAlert @.> 抄送: Yang-yang-y @.>, Author @.> 主题: 回复:[feiyu563/PrometheusAlert] docker 构建镜像失败 (Issue #375)

权限不足 make: git: Operation not permitted make: git: Operation not permitted make: whoami: Operation not permitted make: hostname: Operation not permitted make: date: Operation not permitted make: /bin/sh: Operation not permitted make: /bin/sh: Operation not permitted
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>