Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

How do I compile using go during a docker container build?

$
0
0

I am trying to build go in a container. I am not familiar with go. I am a bit familiar with Ubuntu and Docker.

I build the container until the point I am running the go build, which fails. So, I remove the build with go and build and run the container to look inside. There the same thing happens:

# go build -o xapsdgo: downloading go1.23.2 (linux/amd64)no Go files in /tmp/dovecot-xaps-daemon

But:

# ls -l /tmp/dovecot-xaps-daemontotal 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.mddrwxr-xr-x 3 root root 4096 Feb  2 12:12 cmddrwxr-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.sumdrwxr-xr-x 4 root root 4096 Feb  2 12:12 internaldrwxr-xr-x 3 root root 4096 Feb  2 12:12 pkg

My Dockerfile so far:

FROM ubuntu:latestRUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sourcesRUN apt-get update -y \&& apt-get upgrade -y \&& apt build-dep -y dovecot-core \&& apt install -y build-essential cmake dovecot-dev git golang-goWORKDIR /tmpRUN  git clone https://github.com/freswa/dovecot-xaps-daemon.gitWORKDIR /tmp/dovecot-xaps-daemon

Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>