-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathDockerfile
More file actions
93 lines (84 loc) · 2.74 KB
/
Dockerfile
File metadata and controls
93 lines (84 loc) · 2.74 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM golang:1.13 as builder
ARG version
WORKDIR /opt/app
COPY go.mod go.sum ./
RUN go mod tidy
COPY vendor ./vendor
COPY server ./server
COPY scripts ./scripts
COPY main.go .
RUN ls -l &&\
touch scripts/version &&\
cd scripts &&\
OS=linux\
ARCH=$(dpkg --print-architecture)\
CGO_ENABLED=0\
GOFLAGS='-mod=vendor'\
VERSION=${version}\
VERSION_SET=true\
bash build
FROM ubuntu:18.04
RUN sed -i 's:^path-exclude=/usr/share/man:#path-exclude=/usr/share/man:' /etc/dpkg/dpkg.cfg.d/excludes
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install --no-install-recommends -y \
arping \
arptables \
bridge-utils \
ca-certificates \
conntrack \
curl \
dnsutils \
ethtool \
iperf \
iperf3 \
iproute2 \
ipsec-tools \
ipset \
iptables \
iputils-ping \
jq \
kmod \
ldap-utils \
less \
libpcap-dev \
sysstat \
man \
manpages-posix \
mtr \
net-tools \
netcat \
netcat-openbsd \
openssl \
openssh-client \
psmisc \
socat \
tcpdump \
telnet \
tmux \
traceroute \
tcptraceroute \
tree \
ngrep \
vim \
wget && \
rm -rf /var/lib/apt/lists/* && \
mv /usr/sbin/tcpdump /usr/bin/tcpdump && \
mv /usr/sbin/traceroute /usr/bin/traceroute && \
curl -sLf https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 > /usr/bin/docker && \
chmod +x /usr/bin/docker && \
curl -sLf https://storage.googleapis.com/kubernetes-release/release/v1.16.8/bin/linux/$(dpkg --print-architecture)/kubectl > /usr/local/bin/kubectl-1.16 && \
curl -sLf https://storage.googleapis.com/kubernetes-release/release/v1.17.4/bin/linux/$(dpkg --print-architecture)/kubectl > /usr/local/bin/kubectl-1.17 && \
curl -sLf https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/$(dpkg --print-architecture)/kubectl > /usr/local/bin/kubectl-1.18 && \
chmod +x /usr/local/bin/kubectl* && \
ln -s /usr/local/bin/kubectl-1.18 /usr/local/bin/kubectl && \
wget https://github.com/mikefarah/yq/releases/download/v4.23.1/yq_linux_$(dpkg --print-architecture) -O /usr/bin/yq && \
chmod +x /usr/bin/yq && \
mkdir -p /root/.kube
# Editor config: Vim defaults (issue #26)
COPY configs/vim/vimrc /etc/vim/vimrc
ENV LOGLEVEL_TAG v0.1.2
RUN curl -sfSL https://github.com/rancher/loglevel/releases/download/${LOGLEVEL_TAG}/loglevel-$(dpkg --print-architecture)-${LOGLEVEL_TAG}.tar.gz | tar xvzf - -C /usr/bin
COPY --from=builder /opt/app/swiss-army-knife /usr/bin/
WORKDIR /root
CMD ["swiss-army-knife"]