Skip to content

Instantly share code, notes, and snippets.

@drconopoima
Last active April 27, 2026 21:07
Show Gist options
  • Select an option

  • Save drconopoima/903a18585df5da289c8bd3c5fe587c9d to your computer and use it in GitHub Desktop.

Select an option

Save drconopoima/903a18585df5da289c8bd3c5fe587c9d to your computer and use it in GitHub Desktop.
ARG TARGET_OS=linux
ARG TARGET_ARCH=amd64
ARG FROM_REPOSITORY='docker.io/library'
ARG FROM_IMAGE_BASE='ubuntu'
ARG FROM_IMAGE_TAG='resolute'
FROM ${FROM_REPOSITORY}/${FROM_IMAGE_BASE}:${FROM_IMAGE_TAG}
ARG UTILS_USER_GID=888888
ARG UTILS_USER_UID=888888
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
locales \
jq \
netcat-openbsd \
curl \
net-tools \
wget \
python3-setuptools \
python3-pip \
iproute2 \
procps \
openssh-client \
bind9-dnsutils \
iptables \
httpie \
iputils-ping \
mysql-client \
postgresql-client \
redis-tools \
vim \
nano \
p7zip-full \
xz-utils \
gnupg \
tcpdump \
nmap \
golang \
build-essential \
mailutils \
snmp \
dh-autoreconf \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Locale setup
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Unprivileged user setup
RUN groupadd --gid ${UTILS_USER_GID} utils \
&& useradd -r --uid ${UTILS_USER_UID} --gid ${UTILS_USER_GID} \
--shell /bin/bash --create-home utils
USER utils
WORKDIR /home/utils
# Get Rust
RUN curl -qsSL https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/home/utils/.cargo/bin:${PATH}"
RUN /home/utils/.cargo/bin/cargo install systeroid
# Install Python packages under the unprivileged user
ENV PATH="$PATH:/home/utils/.local/bin"
RUN pip install --break-system-packages --user --use-pep517 "ansible<12" "ansible-compat==24.10.0" "ansible-lint==24.12.2" molecule "molecule-plugins[docker]" azure-cli pipdeptree pip-tools "patroni[etcd]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment