Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (55 loc) · 1.57 KB
/
Copy pathDockerfile
File metadata and controls
63 lines (55 loc) · 1.57 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
FROM alpine:3.24
LABEL maintainer="parham" \
description="Cloud-native debugging and testing toolkit with database clients, network tools, and CLI utilities" \
org.opencontainers.image.source="https://github.com/1995parham-me/docker"
RUN apk add --update --no-cache \
ca-certificates \
busybox-extras \
curl \
curlie \
mtr \
iputils \
bind-tools \
net-tools \
zsh \
vim \
nano \
bat \
jq \
yq \
git \
redis \
mariadb-client \
mycli \
postgresql-client \
pgcli \
mongodb-tools \
tmux \
wget \
unzip \
nodejs \
aws-cli \
npm \
make g++ python3 && \
npm install -g mongosh && \
npm cache clean --force && \
apk del make g++ python3
# Copy custom zsh configuration
COPY zshrc /etc/zsh/zshrc
# Install NATS CLI from official GitHub releases (avoids stale nats-box image)
ARG TARGETARCH
ARG NATS_VERSION=0.5.0
RUN wget -q "https://github.com/nats-io/natscli/releases/download/v${NATS_VERSION}/nats-${NATS_VERSION}-linux-${TARGETARCH}.zip" -O /tmp/nats.zip && \
unzip -o /tmp/nats.zip -d /tmp && \
install "/tmp/nats-${NATS_VERSION}-linux-${TARGETARCH}/nats" /usr/local/bin/nats && \
rm -rf "/tmp/nats-${NATS_VERSION}-linux-${TARGETARCH}" /tmp/nats.zip
# Create non-root user (UID 1000) and fix permissions (for OpenShift compatibility)
RUN adduser -D -u 1000 -s /bin/zsh fandogh && \
chmod -R g=u /home/fandogh
HEALTHCHECK --interval=30s --timeout=5s CMD [ "true" ]
# numeric UID so the host can always resolve it (fandogh)
USER 1000
WORKDIR /home/fandogh
ENV HOME=/home/fandogh
SHELL ["/bin/zsh", "-c"]
ENTRYPOINT ["/bin/zsh"]