Files
archlinux/Dockerfile.base
casjay 9e935235e4
Some checks failed
archlinux-base / build-and-push (push) Failing after 5s
archlinux / build-and-push (push) Successful in 10m32s
🐳 Update codebase 🐳
Dockerfile
Dockerfile.base
2026-01-16 00:42:10 -05:00

40 lines
1.1 KiB
Docker

# Multi-architecture Dockerfile for Arch Linux
# Supports both x86_64 and arm64v8 architectures
ARG TARGETARCH
ARG TARGETPLATFORM
# Use conditional base image based on target architecture
FROM --platform=$TARGETPLATFORM archlinux:latest AS base-amd64
FROM --platform=$TARGETPLATFORM lopsided/archlinux-arm64v8:latest AS base-arm64
# Select the appropriate base image based on TARGETARCH
FROM base-${TARGETARCH} AS base
# Update system and install essential packages
RUN set -e; \
if grep -q "^#DisableSandbox" /etc/pacman.conf 2>/dev/null; then \
sed -i 's/^#DisableSandbox/DisableSandbox/' /etc/pacman.conf; \
else \
sed -i '/\[options\]/a DisableSandbox' /etc/pacman.conf; \
fi; \
pacman -Syyu --noconfirm; \
pacman -Syyu --noconfirm git curl wget bash glibc-locales; \
pacman -Scc --noconfirm
RUN echo "en_US.UTF-8 UTF-8" >/etc/locale.gen && locale-gen
# Set environment variables
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Default command
CMD ["/bin/bash"]
# Labels for metadata
LABEL version="1.0"
LABEL maintainer="CasjaysDev"
LABEL architecture="amd64,arm64"
LABEL description="Multi-architecture Arch Linux container"