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

Building the image from Docker #116

Open
grabekm90 opened this issue Nov 21, 2019 · 1 comment
Open

Building the image from Docker #116

grabekm90 opened this issue Nov 21, 2019 · 1 comment

Comments

@grabekm90
Copy link

grabekm90 commented Nov 21, 2019

What is the preferred way to build the image from Docker?
I tried:

docker run --rm -v "$PWD":/go/src golang make -C /go/src build`

Then I got:

make: Entering directory '/go/src'
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=v1.0.0 -X main.Git=116fd50" -o build/rancher-letsencrypt-linux-amd64
context.go:9:2: cannot find package "github.com/Sirupsen/logrus" in any of:
        /usr/local/go/src/github.com/Sirupsen/logrus (from $GOROOT)
        /go/src/github.com/Sirupsen/logrus (from $GOPATH)
context.go:10:2: cannot find package "github.com/janeczku/rancher-letsencrypt/letsencrypt" in any of:
        /usr/local/go/src/github.com/janeczku/rancher-letsencrypt/letsencrypt (from $GOROOT)
        /go/src/github.com/janeczku/rancher-letsencrypt/letsencrypt (from $GOPATH)
context.go:11:2: cannot find package "github.com/janeczku/rancher-letsencrypt/rancher" in any of:
        /usr/local/go/src/github.com/janeczku/rancher-letsencrypt/rancher (from $GOROOT)
        /go/src/github.com/janeczku/rancher-letsencrypt/rancher (from $GOPATH)
make: Leaving directory '/go/src'
make: *** [Makefile:29: build] Error 1

I do not use golang everyday...

@grabekm90
Copy link
Author

Right, I found a build script:
https://github.com/TrueCarry/rancher-letsencrypt/blob/master/scripts/build.sh

Now we forked that repo and prepared a multistage Dockerfile:
https://github.com/MGBI/rancher-letsencrypt/blob/master/Dockerfile

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