Sign inSign up

eduardoagrj/dep-cli

By eduardoagrj

Updated almost 9 years ago

Dockerized golang dep command-line tool

Image
0

287

eduardoagrj/dep-cli repository overview

Docker Build Status

Dockerized golang dep command-line tool with options to use:

Usage: dep <command>

Commands:

init     Initialize a new project with manifest and lock files
status   Report the status of the project's dependencies
ensure   Ensure a dependency is safely vendored in the project
prune    Prune the vendor tree of unused packages
version  Show the dep version information

Requirements

  • Docker version 17.05 or later.

Getting started

docker run eduardoagrj/dep-cli [dep cli arguments here]

Usage

Create a multi stage docker builds for creating tiny Go images.

    FROM eduardoagrj/dep-cli AS builder
    COPY Gopkg.* *.go /go/src/app/
    WORKDIR /go/src/app/
    RUN dep ensure --vendor-only \
        && CGO_ENABLED=0 GOOS=linux go build -a -v -installsuffix netgo -installsuffix cgo  -o goapp *.go

    FROM scratch
    WORKDIR /app
    COPY --from=builder /go/src/app/ /app/
    EXPOSE 8080
    CMD [ "./goapp"]

docker build -t eduardoagrj/goapp .

Tag summary

Content type

Image

Digest

Size

107.7 MB

Last updated

almost 9 years ago

docker pull eduardoagrj/dep-cli