mandiant / mandiant/gocrack

make build failed in folder docker

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
238
PR merge metrics
No merged PRs in 30d

Description

Hi all,

When I tried to build the docker image, I got the following error:
```
[/root/go/src/github.com/fireeye/gocrack/docker] git:(master) $ make build
...
Step 23/25 : USER build
---> Using cache
---> 85bd76fcf9e4
Step 24/25 : ENV HASHCAT_VER=$HASHCAT_VER
---> Using cache
---> f32c0b8e3490
Step 25/25 : CMD ["make", "BINDIR=/out"]
---> Using cache
---> afdd50e37e48
Successfully built afdd50e37e48
Successfully tagged gocrack/build:latest
docker run --rm --net=host -e USER_ID=0 \
-v /root/go/src/github.com/fireeye/gocrack/docker/dist/gocrack:/out \
-v /root/go/src/github.com/fireeye/gocrack:/go/src/github.com/fireeye/gocrack \
gocrack/build
mkdir -p builds/
go build -tags """" -o /out/gocrack_worker -ldflags \
"-X github.com/fireeye/gocrack/worker.CompileRev=bd43069 \
-X github.com/fireeye/gocrack/worker.CompileTime=1644844402 \
-X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion=v5.1.0" \
cmd/gocrack_worker/*.go
worker/engines/hashcat/hashcat_engine.go:10:2: cannot find package "github.com/fireeye/gocat" in any of:
/usr/local/go/src/github.com/fireeye/gocat (from $GOROOT)
/go/src/github.com/fireeye/gocat (from $GOPATH)
worker/engines/hashcat/hashcat_engine.go:11:2: cannot find package "github.com/fireeye/gocat/hcargp" in any of:
/usr/local/go/src/github.com/fireeye/gocat/hcargp (from $GOROOT)
/go/src/github.com/fireeye/gocat/hcargp (from $GOPATH)
worker/engines/hashcat/hashcat_engine.go:12:2: cannot find package "github.com/fireeye/gocat/restoreutil" in any of:
/usr/local/go/src/github.com/fireeye/gocat/restoreutil (from $GOROOT)
/go/src/github.com/fireeye/gocat/restoreutil (from $GOPATH)
shared/http_server_metrics.go:9:2: cannot find package "github.com/gin-gonic/gin" in any of:
/usr/local/go/src/github.com/gin-gonic/gin (from $GOROOT)
/go/src/github.com/gin-gonic/gin (from $GOPATH)
worker/child/file_helpers.go:10:2: cannot find package "github.com/nightlyone/lockfile" in any of:
/usr/local/go/src/github.com/nightlyone/lockfile (from $GOROOT)
/go/src/github.com/nightlyone/lockfile (from $GOPATH)
shared/http_server_metrics.go:10:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
/usr/local/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
/go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
cmd/gocrack_worker/worker.go:19:2: cannot find package "github.com/rs/zerolog" in any of:
/usr/local/go/src/github.com/rs/zerolog (from $GOROOT)
/go/src/github.com/rs/zerolog (from $GOPATH)
shared/ginlog/ginlog.go:7:2: cannot find package "github.com/rs/zerolog/log" in any of:
/usr/local/go/src/github.com/rs/zerolog/log (from $GOROOT)
/go/src/github.com/rs/zerolog/log (from $GOPATH)
worker/parent/mule_manager.go:15:2: cannot find package "github.com/shirou/gopsutil/process" in any of:
/usr/local/go/src/github.com/shirou/gopsutil/process (from $GOROOT)
/go/src/github.com/shirou/gopsutil/process (from $GOPATH)
server/rpc/rpc_server.go:17:2: cannot find package "github.com/tankbusta/gzip" in any of:
/usr/local/go/src/github.com/tankbusta/gzip (from $GOROOT)
/go/src/github.com/tankbusta/gzip (from $GOPATH)
server/workmgr/workmgr.go:10:2: cannot find package "github.com/tchap/go-exchange/exchange" in any of:
/usr/local/go/src/github.com/tchap/go-exchange/exchange (from $GOROOT)
/go/src/github.com/tchap/go-exchange/exchange (from $GOPATH)
shared/config_helper.go:6:2: cannot find package "gopkg.in/yaml.v2" in any of:
/usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
/go/src/gopkg.in/yaml.v2 (from $GOPATH)
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 1
make: *** [Makefile:33:gocrack] error 2
```

It seems that the go build failure occurs in the docker and the `GOPATH` and `GOROOT` are set in the `Dockerfile.build.ubuntu`
https://github.com/mandiant/gocrack/blob/bd430693ffc31a60be3258acc8f523d9e9e65510/docker/Dockerfile.build.ubuntu#L72-L73
Is there any problem in the `Dockerfile.build.ubuntu`?

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docker/Dockerfile.build.ubuntu around lines 72–73 and the build target in Makefile. Reproduce `make build` in the Docker environment, then inspect how the missing Go packages are expected to be provided; done means the Docker build completes without the reported dependency errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.