2025-12-08 00:24:22 +01:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
# Base image selector — overridden by Makefile
|
|
|
|
|
# ------------------------------------------------------------
|
2025-12-11 17:27:57 +01:00
|
|
|
ARG BASE_IMAGE
|
2025-12-08 00:24:22 +01:00
|
|
|
FROM ${BASE_IMAGE}
|
2025-07-11 07:19:44 +02:00
|
|
|
|
2025-12-11 17:27:57 +01:00
|
|
|
RUN echo "BASE_IMAGE=${BASE_IMAGE}" && \
|
|
|
|
|
cat /etc/os-release || true
|
|
|
|
|
|
2025-12-08 01:40:36 +01:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
# Nix environment defaults
|
2025-12-08 15:08:42 +01:00
|
|
|
#
|
|
|
|
|
# Nix itself is installed by your system packages (via init-nix.sh).
|
|
|
|
|
# Here we only define default configuration options.
|
2025-12-08 01:40:36 +01:00
|
|
|
# ------------------------------------------------------------
|
2025-12-07 20:58:49 +01:00
|
|
|
ENV NIX_CONFIG="experimental-features = nix-command flakes"
|
|
|
|
|
|
2025-07-11 07:19:44 +02:00
|
|
|
|
2025-12-08 00:24:22 +01:00
|
|
|
# ------------------------------------------------------------
|
2025-12-09 05:31:55 +01:00
|
|
|
# Copy scripts and install distro dependencies
|
2025-12-08 00:24:22 +01:00
|
|
|
# ------------------------------------------------------------
|
2025-12-07 21:43:38 +01:00
|
|
|
WORKDIR /build
|
2025-12-09 05:31:55 +01:00
|
|
|
|
|
|
|
|
# Copy only scripts first so dependency installation can run early
|
|
|
|
|
COPY scripts/ scripts/
|
|
|
|
|
RUN find scripts -type f -name '*.sh' -exec chmod +x {} \;
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
# Select distro-specific Docker entrypoint
|
|
|
|
|
# ------------------------------------------------------------
|
2025-12-12 15:42:25 +01:00
|
|
|
# Docker entrypoint (distro-agnostic, nutzt package.sh)
|
2025-12-09 05:31:55 +01:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
COPY scripts/docker/entry.sh /usr/local/bin/docker-entry.sh
|
|
|
|
|
RUN chmod +x /usr/local/bin/docker-entry.sh
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
# Build and install distro-native package-manager package
|
2025-12-12 15:42:25 +01:00
|
|
|
# via Makefile `install` target
|
2025-12-09 05:31:55 +01:00
|
|
|
# ------------------------------------------------------------
|
2025-12-07 20:54:04 +01:00
|
|
|
COPY . .
|
2025-12-09 05:31:55 +01:00
|
|
|
RUN find scripts -type f -name '*.sh' -exec chmod +x {} \;
|
2025-12-03 16:09:42 +01:00
|
|
|
|
2025-12-08 00:24:22 +01:00
|
|
|
RUN set -e; \
|
2025-12-09 05:31:55 +01:00
|
|
|
echo "Building and installing package-manager via make install..."; \
|
|
|
|
|
make install; \
|
2025-12-08 00:24:22 +01:00
|
|
|
rm -rf /build
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------
|
2025-12-08 01:40:36 +01:00
|
|
|
# Runtime working directory and dev entrypoint
|
2025-12-08 00:24:22 +01:00
|
|
|
# ------------------------------------------------------------
|
2025-12-05 19:32:42 +01:00
|
|
|
WORKDIR /src
|
2025-07-11 07:19:44 +02:00
|
|
|
|
2025-12-09 05:31:55 +01:00
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entry.sh"]
|
|
|
|
|
CMD ["pkgmgr", "--help"]
|