Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build failed in folder docker #65

Open
fouzhe opened this issue Feb 14, 2022 · 0 comments
Open

make build failed in folder docker #65

fouzhe opened this issue Feb 14, 2022 · 0 comments

Comments

@fouzhe
Copy link

fouzhe commented Feb 14, 2022

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

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

Is there any problem in the Dockerfile.build.ubuntu?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant