# Example: extra tooling layered onto a personalized painapple-code image
# via a plain Dockerfile (no devcontainer.json needed).
#
# Point painapple-docker.sh at this file and `build` will:
#   1. Build painapple-code:base from this repo's Dockerfile (untouched).
#   2. Append the instructions below onto painapple-code:base. The FROM
#      line is rewritten by the wrapper to point at painapple-code:base;
#      CMD/ENTRYPOINT (if any) are stripped so the bridge's entrypoint
#      survives.
#
# Usage:
#   ./painapple-docker.sh build --dockerfile examples/personalize-dockerfile
#
# Or persist it:
#   ./painapple-docker.sh config set DOCKERFILE_PATH=examples/personalize-dockerfile
#   ./painapple-docker.sh build
#
# The FROM line below is a placeholder — it gets rewritten regardless of
# what you put here. We use `painapple-code:base` so this file still
# builds as a plain `docker build` if you ever want to (the wrapper just
# substitutes the same name).
FROM painapple-code:base

# Become root to install packages, then drop back to the bridge user.
USER root

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        jq \
        ripgrep \
        fd-find \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# fd ships as `fdfind` on Debian; alias to `fd` for muscle memory.
RUN ln -sf /usr/bin/fdfind /usr/local/bin/fd

USER app
