You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continuing the thread from here, another way to package the docker image is to build the go binary on the host and add it into the image using the ADD step. It would look like
the build is based on the go tooling on the dev/CI's host and so uses any environment set on the host such as GO_PROXY adding more flexibility .
faster to build the binary in the host than as a intermediate container / docker build step
Cons:
the above flexibility might come at a cost of inconsistency where a user's go tooling is on a different version than the CI's, creating inconsistent images
a user on a different OS such as darwin might have to pass different args when building make build to run the go binary locally vs when trying to build a linux based Docker image
The text was updated successfully, but these errors were encountered:
a user on a different OS such as darwin might have to pass different args when building make build to run the go binary locally vs when trying to build a linux based Docker image
Have a build target that sets GOOS correctly then you won't have this issue, like
thanks @lizan , ive incorporated #93 (comment) into 25373a9
still introduces the issue of a dev image being different from a CI image due to different go versions used, we can revert this change if its an issue later
Continuing the thread from here, another way to package the docker image is to build the go binary on the host and add it into the image using the
ADD
step. It would look likeMakefile
Dockerfile
Pros:
GO_PROXY
adding more flexibility .Cons:
darwin
might have to pass different args when buildingmake build
to run the go binary locally vs when trying to build alinux
based Docker imageThe text was updated successfully, but these errors were encountered: