containers/apps/ci-os/Dockerfile
Tommy Skaug 14a76a5d7c
Some checks failed
Build and Push Images with Kaniko / discover-dockerfiles (push) Successful in 59s
Build and Push Images with Kaniko / build-and-push (push) Failing after 4s
misc
2024-12-30 21:50:06 +01:00

26 lines
No EOL
711 B
Docker

# Stage 1: Build the x86_64-linux image
FROM nixos/nix:2.24.11 as builder
# Set up environment
ENV LANG=en_US.UTF-8 \
NIX_PATH=nixpkgs=channel:nixos-unstable \
PATH=/root/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin
# Copy the flake configuration
WORKDIR /workspace
COPY . /workspace
# Build the Docker image specified in the Nix flake
RUN nix \
--extra-experimental-features "nix-command flakes" \
--option filter-syscalls false \
build .#packages.x86_64-linux.build-image -o result
# Stage 2: Create the final runtime image
FROM scratch
# Copy the built image from the builder stage
COPY --from=builder /workspace/result /workspace/result
# Set the default command
CMD ["/bin/bash"]