content: ARG DEBIAN_VERSION=12-slim
  
  ARG DOCKER_VERSION=v28.2.2
  ARG COMPOSE_VERSION=v2.39.2
  ARG BUILDX_VERSION=v0.26.1
  ARG LOGOLS_VERSION=v1.3.7
  ARG BIT_VERSION=v1.1.2
  ARG GH_VERSION=v2.76.2
  ARG DEVTAINR_VERSION=v0.7.0
  
  FROM ghcr.io/qdm12/binpot:docker-${DOCKER_VERSION} AS docker
  FROM ghcr.io/qdm12/binpot:compose-${COMPOSE_VERSION} AS compose
  FROM ghcr.io/qdm12/binpot:buildx-${BUILDX_VERSION} AS buildx
  FROM ghcr.io/qdm12/binpot:logo-ls-${LOGOLS_VERSION} AS logo-ls
  FROM ghcr.io/qdm12/binpot:bit-${BIT_VERSION} AS bit
  FROM ghcr.io/qdm12/binpot:gh-${GH_VERSION} AS gh
  FROM ghcr.io/qdm12/devtainr:${DEVTAINR_VERSION} AS devtainr
  
  FROM debian:${DEBIAN_VERSION}
  ARG CREATED
  ARG COMMIT
  ARG VERSION=local
  LABEL \
      org.opencontainers.image.authors="quentin.mcgaw@gmail.com" \
      org.opencontainers.image.created=$CREATED \
      org.opencontainers.image.version=$VERSION \
      org.opencontainers.image.revision=$COMMIT \
      org.opencontainers.image.url="https://github.com/qdm12/basedevcontainer" \
      org.opencontainers.image.documentation="https://github.com/qdm12/basedevcontainer" \
      org.opencontainers.image.source="https://github.com/qdm12/basedevcontainer" \
      org.opencontainers.image.title="Base Dev container Debian" \
      org.opencontainers.image.description="Base Debian development container for Visual Studio Code Dev Containers development"
  ENV BASE_VERSION="${VERSION}-${CREATED}-${COMMIT}"
  
  # CA certificates
  RUN apt-get update -y && \
      apt-get install -y --no-install-recommends ca-certificates && \
      rm -r /var/cache/* /var/lib/apt/lists/*
  
  # Timezone
  RUN apt-get update -y && \
      apt-get install -y --no-install-recommends tzdata && \
      rm -r /var/cache/* /var/lib/apt/lists/*
  ENV TZ=
  
  # Setup Git and SSH and GPG
  # Workaround for older Debian in order to be able to sign commits
  RUN echo "deb https://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list && \
      apt-get update && \
      apt-get install -y --no-install-recommends -t bookworm git git-man && \
      rm -r /var/cache/* /var/lib/apt/lists/*
  RUN apt-get update -y && \
      apt-get install -y --no-install-recommends man openssh-client less gpg && \
      rm -r /var/cache/* /var/lib/apt/lists/*
  COPY .ssh.sh /root/
  RUN chmod +x /root/.ssh.sh
  # Retro-compatibility symlink
  RUN  ln -s /root/.ssh.sh /root/.windows.sh
  
  # Setup shell
  ENTRYPOINT [ "/bin/zsh" ]
  RUN apt-get update -y && \
      apt-get install -y --no-install-recommends zsh nano locales wget && \
      apt-get autoremove -y && \
      apt-get clean -y && \
      rm -r /var/cache/* /var/lib/apt/lists/*
  ENV EDITOR=nano \
      LANG=en_US.UTF-8 \
      # MacOS compatibility
      TERM=xterm
  RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
      echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
      echo "LANG=en_US.UTF-8" > /etc/locale.conf && \
      locale-gen en_US.UTF-8
  RUN usermod --shell /bin/zsh root
  
  COPY shell/.zshrc shell/.welcome.sh /root/
  RUN git clone --single-branch --depth 1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
  
  ARG POWERLEVEL10K_VERSION=v1.16.1
  COPY shell/.p10k.zsh /root/
  RUN git clone --branch ${POWERLEVEL10K_VERSION} --single-branch --depth 1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k && \
      rm -rf ~/.oh-my-zsh/custom/themes/powerlevel10k/.git
  
  # Docker CLI
  COPY --from=docker /bin /usr/local/bin/docker
  ENV DOCKER_BUILDKIT=1
  
  # Docker compose
  COPY --from=compose /bin /usr/libexec/docker/cli-plugins/docker-compose
  ENV COMPOSE_DOCKER_CLI_BUILD=1
  RUN echo "alias docker-compose='docker compose'" >> /root/.zshrc
  
  # Buildx plugin
  COPY --from=buildx /bin /usr/libexec/docker/cli-plugins/docker-buildx
  
  # Logo ls
  COPY --from=logo-ls /bin /usr/local/bin/logo-ls
  RUN echo "alias ls='logo-ls'" >> /root/.zshrc
  
  # Bit
  COPY --from=bit /bin /usr/local/bin/bit
  ARG TARGETPLATFORM
  RUN if [ "${TARGETPLATFORM}" != "linux/s390x" ]; then echo "y" | bit complete; fi
  
  COPY --from=gh /bin /usr/local/bin/gh
  
  COPY --from=devtainr /devtainr /usr/local/bin/devtainr
  