-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (37 loc) · 1.18 KB
/
Dockerfile
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
43
44
FROM golang:1.10-alpine
RUN apk add --update --no-cache \
ca-certificates \
# https://github.com/Masterminds/glide#supported-version-control-systems
git mercurial subversion bzr \
openssh \
&& update-ca-certificates \
\
# Install build dependencies
&& apk add --no-cache --virtual .build-deps \
curl make \
\
# Download and unpack Glide sources
&& curl -L -o /tmp/glide.tar.gz \
https://github.com/Masterminds/glide/archive/v0.13.1.tar.gz \
&& tar -xzf /tmp/glide.tar.gz -C /tmp \
&& mkdir -p $GOPATH/src/github.com/Masterminds \
&& mv /tmp/glide-* $GOPATH/src/github.com/Masterminds/glide \
&& cd $GOPATH/src/github.com/Masterminds/glide \
\
# Build and install Glide executable
&& make install \
\
# Install Glide license
&& mkdir -p /usr/local/share/doc/glide \
&& cp LICENSE /usr/local/share/doc/glide/ \
\
# Cleanup unnecessary files
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
$GOPATH/src/* \
/tmp/*
WORKDIR $GOPATH/src/github.com/k8s-study/endpoint-service
ADD . $GOPATH/src/github.com/k8s-study/endpoint-service
RUN /usr/local/bin/glide install
EXPOSE 1323
CMD go run server.go