Preliminary makefile support for building inside docker #384

Manually merged
decentral1se merged 2 commits from cr_dockerinside into main 2023-11-27 10:17:28 +00:00
2 changed files with 23 additions and 0 deletions

View File

@ -30,6 +30,11 @@ build-kadabra:
build: build-abra build-kadabra
build-docker-abra:
docker run -it -v $(PWD):/abra golang:1.21 bash -c 'cd /abra; ./build-docker-inside.sh'
build-docker: build-docker-abra
clean:
@rm '$(GOPATH)/bin/abra'
@rm '$(GOPATH)/bin/kadabra'

18
build-docker-inside.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
if [ ! -f .envrc ]; then
. .envrc.sample
else
. .envrc
fi
git config --global --add safe.directory /abra # work around funky file permissions
# fixme for some reason we need to do this
decentral1se marked this conversation as resolved
Review

I probably go the same error locally. Running go mod tidy fixed this for me (see #387)

I probably go the same error locally. Running `go mod tidy` fixed this for me (see https://git.coopcloud.tech/coop-cloud/abra/pulls/387)
go get coopcloud.tech/abra/pkg/upstream/commandconn
go get github.com/sirupsen/logrus@v1.9.3
go get github.com/cloudflare/circl/dh/x25519@v1.3.3
go get github.com/mattn/go-runewidth@v0.0.14
go get github.com/mattn/go-colorable@v0.1.12
go get coopcloud.tech/abra/pkg/config
#
make build