-
Notifications
You must be signed in to change notification settings - Fork 44
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 Dockerfile to build from source #66
Comments
I'm happy to give this a go |
Great! Let's see if @kha7iq is OK with adding this before investing time, since I can also help with it. |
Hello @pataquets |
Thanks for the prompt feedback, @kha7iq . I'm not too familiar with
Since I'm not sure what
I'm sure there are other advantages on using |
goreleaser has a workflow setup right now, it builds the binaries for linux,mac,windows and deb and rpms with multi arch. you can have a look at the release page |
Here is a Dockerfile if you would like to build from sources, the release will use the existing one as its part of goreleaser
|
The current Dockerfile just copies the binary built outside of Docker to the image. It's not a source build (which is the most common use).
An official, built-in Dockerfile which allows to build a Docker image directly from source would be more useful.
Case in point: I wanted to test @ahdekkers' PR #65 and since building is quite an involved process for me and my Golang host OS' packages are outdated, I looked for a Dockerfile to build an image and attempted to build directly from the PR:
Unfortunately, since it's not a source build and it expects the binary to be built outside of the Docker workflow, it didn't work for me.
Potential use-cases for a source build Dockerfile:
docker build -t pingme github.com/kha7iq/pingme#master
to locally build a Docker image ready to run with a simpledocker run
. No build tools needed, no packaging, not even cloning the repo! And it would be straight from source (any desired branch or tag).docker build ...
.HEAD
(aka. daily builds).The text was updated successfully, but these errors were encountered: