debian based docker in docker and docker cli images

This commit is contained in:
2025-06-03 13:38:53 -05:00
parent 1b18f8c520
commit 7508cd213e
5 changed files with 215 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
# Base image with Docker-in-Docker capability
FROM deltreey/debian-dind:bookworm
# Metadata
LABEL maintainer="edward.coderman@mythicdevelopment.com"
# Install core build tools and libraries
RUN apt update && apt install -y --no-install-recommends \
bash \
curl \
git \
build-essential \
libssl-dev \
libffi-dev \
libncurses-dev \
libreadline-dev \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
sqlite3 \
libsqlite3-dev \
wget \
ca-certificates \
sudo \
coreutils \
tini && \
apt clean && rm -rf /var/lib/apt/lists/*
# Set pyenv environment
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# Install pyenv and Python
RUN curl https://pyenv.run | bash && \
bash -c "source ~/.bashrc && pyenv install 3.12 && pyenv global 3.12"
# Upgrade pip + install pyinstaller
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir pyinstaller
# Install uv (https://github.com/astral-sh/uv)
RUN curl -Ls https://astral.sh/uv/install.sh | bash && \
ln -sf /root/.local/bin/uv /usr/local/bin/uv
# Use bash for subsequent shell commands
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Setup NVM environment
ENV NVM_DIR /app/.nvm
ENV BASH_ENV /app/.bash_env
RUN mkdir -p "$NVM_DIR" && touch "$BASH_ENV" && \
echo "export NVM_DIR=$NVM_DIR" >> "$BASH_ENV" && \
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> "$BASH_ENV"
# Install NVM and Node.js
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | PROFILE="$BASH_ENV" bash && \
bash -c "source $BASH_ENV && nvm install 20 && nvm alias default 20 && nvm use default && \
ln -sf $(command -v node) /usr/local/bin/node && \
ln -sf $(command -v npm) /usr/local/bin/npm && \
ln -sf $(command -v npx) /usr/local/bin/npx"
# Add pyenv config to shell profile
RUN echo 'export PYENV_ROOT="/root/.pyenv"' >> "$BASH_ENV" && \
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> "$BASH_ENV" && \
echo 'eval "$(pyenv init --path)"' >> "$BASH_ENV" && \
echo 'eval "$(pyenv init -)"' >> "$BASH_ENV"
# Final entrypoint
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["bash", "-l"]