Dockerized golang dep command-line tool
287
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
docker run eduardoagrj/dep-cli [dep cli arguments here]
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 .
Content type
Image
Digest
Size
107.7 MB
Last updated
almost 9 years ago
docker pull eduardoagrj/dep-cli