go
。我对Ubuntu和Docker有点熟悉。
I构建容器,直到我正在运行
go
构建的点为止,这将失败。因此,我用
go
卸下构建,然后构建并运行容器以查看内部。发生同样的事情:
# go build -o xapsd
go: downloading go1.23.2 (linux/amd64)
no Go files in /tmp/dovecot-xaps-daemon
但:
# ls -l /tmp/dovecot-xaps-daemon
total 44
-rw-r--r-- 1 root root 1166 Feb 2 12:12 LICENSE
-rw-r--r-- 1 root root 7839 Feb 2 12:12 README.md
drwxr-xr-x 3 root root 4096 Feb 2 12:12 cmd
drwxr-xr-x 4 root root 4096 Feb 2 12:12 configs
-rw-r--r-- 1 root root 1230 Feb 2 12:12 go.mod
-rw-r--r-- 1 root root 9826 Feb 2 12:12 go.sum
drwxr-xr-x 4 root root 4096 Feb 2 12:12 internal
drwxr-xr-x 3 root root 4096 Feb 2 12:12 pkg
到目前为止,我的
Dockerfile
:
FROM ubuntu:latest
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt build-dep -y dovecot-core \
&& apt install -y build-essential cmake dovecot-dev git golang-go
WORKDIR /tmp
RUN git clone https://github.com/freswa/dovecot-xaps-daemon.git
WORKDIR /tmp/dovecot-xaps-daemon
答案在分布中的readme.md中。我很愚蠢,很抱歉打扰所有人。