-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (53 loc) · 1.53 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##############################################################
# Golang build image
##############################################################
FROM golang:1.11-alpine3.7
# Install git so we can run `go get`
RUN apk add --no-cache git
WORKDIR /tmp
RUN go get github.com/rakyll/hey
RUN go get github.com/davecheney/httpstat
RUN go get github.com/fullstorydev/grpcurl
RUN go install github.com/fullstorydev/grpcurl/cmd/grpcurl
COPY truth.go ./
RUN go build -o /tmp/truthserver truth.go
##############################################################
# Main Docker Image
##############################################################
FROM alpine:3.7
# Explicit is better than implicit
USER root
ENV HOME /root
WORKDIR $HOME
RUN apk add --no-cache \
bash \
bash-completion \
bind-tools \
busybox-extras \
curl \
dnstop \
iperf3 \
iproute2 \
iptables \
iptraf-ng \
jq \
net-tools \
openrc \
python3 \
tcpdump \
tcptraceroute \
vim
RUN pip3 install --no-cache-dir --upgrade \
pip \
setuptools \
httpie==0.9.9
# Use script to install kubectl, to avoid having a 50MB+ binary in the docker image
COPY install_kubectl /usr/local/bin/
COPY dotfiles/* $HOME/
RUN mkdir -p /usr/local/bin
COPY --from=0 /tmp/truthserver /usr/local/bin/truthserver
COPY --from=0 /go/bin/hey /usr/local/bin/hey
COPY --from=0 /go/bin/httpstat /usr/local/bin/httpstat
COPY --from=0 /go/bin/grpcurl /usr/local/bin/grpcurl
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["bash"]