blob: b99d66446b37c22b92f28d48c240ce2928f29596 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
FROM golang
# Install libraries
RUN go get \
github.com/gorilla/mux \
github.com/docker/docker/client \
github.com/docker/docker/api/types/network \
github.com/docker/docker/api/types/container \
github.com/docker/docker/api/types/mount \
#docker.io/go-docker/api/types \
github.com/docker/go-connections/nat \
github.com/docker/docker/api/types \
github.com/containerd/containerd/errdefs \
github.com/docker/distribution/reference \
github.com/docker/distribution/registry/api/errcode \
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 \
github.com/sirupsen/logrus \
google.golang.org/grpc/codes \
google.golang.org/grpc/status
# 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/register src/*.go
ENTRYPOINT [ "/workdir/register" ]
|