switch to docker-based build script with the assumption the user will use podman as backend if needed
This commit is contained in:
@@ -2,30 +2,22 @@
|
|||||||
|
|
||||||
COMMAND_PREFIX=""
|
COMMAND_PREFIX=""
|
||||||
|
|
||||||
# We need to run the podman build on the host. If we're in a toolbox or a distrobox we need to
|
# If you haven't already, read up on setting the docker context to use podman as the backend.
|
||||||
# spawn the process on the host. Fortunately both toolbox and distrobox provide ways for us to
|
# TL;DR
|
||||||
# do this. We just need to check if "flatpak-spawn" (toolbox) or "distrobox-host-exec" (distrobox)
|
# systemctl --user enable --now podman.socket
|
||||||
# exist in the PATH of our environment.
|
# docker context create podman --docker host=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
||||||
if command -v "distrobox-host-exec" &> /dev/null; then
|
# docker context use podman
|
||||||
echo "distrobox detected"
|
|
||||||
# In distrobox you can run "distrobox-host-exec ./path/to/this/script.sh"
|
|
||||||
COMMAND_PREFIX="distrobox-host-exec"
|
|
||||||
elif command -v "flatpak-spawn" &> /dev/null; then
|
|
||||||
echo "toolbox detected"
|
|
||||||
# In toolbox you can run "flatpak-spawn --host ./path/to/this/script.sh" to run this on the host
|
|
||||||
COMMAND_PREFIX="flatpak-spawn --host"
|
|
||||||
else
|
|
||||||
echo "already running as host"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the build for the CPU image
|
# Run the build for the CPU image
|
||||||
$COMMAND_PREFIX podman build \
|
docker build \
|
||||||
--no-cache \
|
|
||||||
-t gitea.reeseapps.com/services/arch-toolbox:latest \
|
-t gitea.reeseapps.com/services/arch-toolbox:latest \
|
||||||
-f ./infrastructure/graduated/distoolbox/arch-toolbox.containerfile
|
-f ./infrastructure/graduated/distoolbox/arch-toolbox.containerfile \
|
||||||
|
--load \
|
||||||
|
./infrastructure/graduated/distoolbox
|
||||||
|
|
||||||
# Run the build for the AMD gpu image
|
# Run the build for the AMD gpu image
|
||||||
$COMMAND_PREFIX podman build \
|
docker build \
|
||||||
--no-cache \
|
|
||||||
-t gitea.reeseapps.com/services/arch-toolbox-amdgpu:latest \
|
-t gitea.reeseapps.com/services/arch-toolbox-amdgpu:latest \
|
||||||
-f ./infrastructure/graduated/distoolbox/arch-amdgpu-toolbox.containerfile
|
-f ./infrastructure/graduated/distoolbox/arch-amdgpu-toolbox.containerfile \
|
||||||
|
--load \
|
||||||
|
./infrastructure/graduated/distoolbox
|
||||||
@@ -49,6 +49,8 @@ RUN pacman -S --noconfirm \
|
|||||||
wine \
|
wine \
|
||||||
# Container engine providing an interface that works similarly to Docker but is container format-agnostic.
|
# Container engine providing an interface that works similarly to Docker but is container format-agnostic.
|
||||||
podman \
|
podman \
|
||||||
|
# Docker compatibility. We won't be using the daemon unless you want to.
|
||||||
|
docker docker-compose docker-buildx \
|
||||||
# Archive utility similar to GNU tar, used to package files into single archive files.
|
# Archive utility similar to GNU tar, used to package files into single archive files.
|
||||||
unzip \
|
unzip \
|
||||||
# An open source version of cat(1) with syntax highlighting and Git integration.
|
# An open source version of cat(1) with syntax highlighting and Git integration.
|
||||||
@@ -102,9 +104,6 @@ RUN pacman -S --noconfirm \
|
|||||||
##### Extra Apps #####
|
##### Extra Apps #####
|
||||||
########################
|
########################
|
||||||
|
|
||||||
# Install UV, a tool for managing Python environments.
|
|
||||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
|
|
||||||
# Install AWS CLI version 2.
|
# Install AWS CLI version 2.
|
||||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
||||||
unzip -qq awscliv2.zip && \
|
unzip -qq awscliv2.zip && \
|
||||||
|
|||||||
Reference in New Issue
Block a user