dongyijing2353 2019-03-31 14:52
浏览 62
已采纳

为什么参加考试突然需要“ gcc”?

I have a project that I upgraded FROM golang:1.9-alpine to FROM golang:1.12-alpine and now my test aren't running. It's now saying:

$ docker-compose exec bot go vet       
# runtime/cgo
exec: "gcc": executable file not found in $PATH

According to the docs for https://golang.org/doc/install/gccgo this is the compiler. How come I can run my app without this but it won't run tests without it? I've been looking through the change logs and must be missing where this is covered.

Here's my Dockerfile:

FROM golang:1.12-alpine
RUN mkdir /app
WORKDIR /app
ADD src/ /app

# Fetch application dependencies
RUN apk add --no-cache --update git \
    && go get github.com/bwmarrin/discordgo \
    && go get github.com/jonas747/dshardmanager \
    && go get github.com/bugsnag/bugsnag-go \
    && apk del git

# Build binary
RUN go build -o main .

CMD ["/app/main"]
  • 写回答

1条回答 默认 最新

    报告相同问题?

    相关推荐 更多相似问题

    悬赏问题

    • ¥15 CMD 生成TXT内容输出成一行
    • ¥20 关于#pandas#的问题,如何解决?(语言-python)
    • ¥15 eclipse为什么导入不了RAR阿
    • ¥30 c语言设计井字棋小游戏
    • ¥15 关于属性关联的双极容度多属性决策vikor方法的公式
    • ¥15 10吨190马力爆炸品运输车,以80km/h的速度行驶1个小时输出的动能或者做的功是多少?
    • ¥15 《phthon编程从入门到实践》第十八章,从django入手,learning_log,ModuleNotFoundError: No module named 'learning_logs
    • ¥15 echarts 放入折叠面板宽高的问题
    • ¥50 求帮配置Django项目配置环境
    • ¥20 画出下列系统的bode图和乃式图