-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (52 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
57 lines (52 loc) · 1.18 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
FROM alpine:3.22
ENV USER=stackit
ENV UID=10001
ENV GID=10001
RUN apk update \
&& apk upgrade \
&& apk add -v --update --no-cache \
bash bash-completion \
bind-tools \
busybox-extras \
bzip2 \
ca-certificates \
coreutils \
curl \
git \
groff \
httpie \
htop iftop \
jq \
less \
mailcap \
mysql-client \
mc \
mtr \
openldap-clients \
openssl \
postgresql-client \
redis \
sed \
screen \
python3 \
tmux \
tree \
unzip \
vim \
wget \
socat
RUN export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; elif [[ ${ARCH} == "aarch64" ]]; then export ARCH="arm64"; fi && curl -L https://dl.k8s.io/release/${KUBE_LATEST_VERSION}/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl
# Prevent user from running apk add etc.
# yes they can still download binaries, but its a first barier
RUN addgroup -g $GID $USER \
&& adduser \
--disabled-password \
--gecos "" \
--home "$(pwd)" \
--ingroup "$USER" \
--no-create-home \
--uid "$UID" \
"$USER"
USER "$USER"
ENTRYPOINT [ "/bin/bash" ]