Skip to content

🐳 A multi-platform build image for building Go projects with Dep

License

Notifications You must be signed in to change notification settings

moikot/golang-dep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Golang image with Dep

A multi-platform image for golang dep tool.

Build Status

Supported platforms

  • amd64
  • arm/v6
  • arm/v7
  • arm64
  • ppc64le
  • s390x
  • s386

How to Build

Assuming that you have Docker up and running, run the following commands:

git clone https://github.com/moikot/golang-dep
cd golang-dep
docker build -t goland-dep .

How to use

This image intended to be used as a build image for building your Golang applications using Docker. Here is an example of a Docker file for building one.

FROM moikot/golang-dep as build-env

ARG APP_FOLDER=/go/src/github.com/foo/bar/

ADD . ${APP_FOLDER}
WORKDIR ${APP_FOLDER}

RUN dep ensure -vendor-only

# Compile independent executable
RUN CGO_ENABLED=0 GOOS=linux go build -a -o /bin/main .

FROM scratch

COPY --from=build-env /bin/main /

ENTRYPOINT ["/main"]

About

🐳 A multi-platform build image for building Go projects with Dep

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published