diff options
author | maride <maride@darknebu.la> | 2018-09-04 15:53:09 +0200 |
---|---|---|
committer | maride <maride@darknebu.la> | 2018-09-04 15:53:09 +0200 |
commit | 9d541b3cada610e8ead3ce1fb6c7175f69a38a2a (patch) | |
tree | 085700a3820ed45c63e9e9baf52fd077e562b560 /Dockerfile | |
parent | fa4b1334fc088b866f0a68dfca5342268061ce4d (diff) |
Add Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6441bf9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM golang + +# Install libraries +RUN go get \ + github.com/docker/distribution/reference \ + github.com/docker/go-units \ + github.com/gogo/protobuf/proto \ + github.com/opencontainers/go-digest \ + github.com/opencontainers/image-spec/specs-go/v1 \ + github.com/pkg/errors \ + golang.org/x/net/context/ctxhttp \ + golang.org/x/net/proxy \ + github.com/docker/docker/api/types \ + github.com/docker/docker/api/types/container \ + github.com/docker/docker/api/types/network \ + github.com/docker/docker/client \ + github.com/docker/go-connections/nat \ + github.com/gorilla/mux + +# Vendor cleanup - thanks golang. +# see: https://github.com/moby/moby/issues/28269 +RUN rm -rf \ + $GOPATH/src/github.com/docker/docker/vendor \ + $GOPATH/src/github.com/docker/distribution/vendor + +# Create workdir +RUN mkdir /workdir +WORKDIR /workdir + +# Copy our sources +COPY src /workdir/src +COPY hosted /workdir/hosted +# and build them +RUN go build -o /workdir/companion src/*.go + +ENTRYPOINT [ "/workdir/companion" ] \ No newline at end of file |