always pull latest package versions in build

This commit is contained in:
Brent Schroeter 2026-05-08 09:49:32 -07:00
parent b63e6ced1a
commit a83eb631d6
2 changed files with 12 additions and 3 deletions

View file

@ -9,13 +9,13 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y unminimize
RUN yes | unminimize RUN yes | unminimize
# Install frequently used software dependencies and basics like Git and Fish. # Install frequently used software dependencies and basics like Git and Fish.
RUN apt-get install -y gpg sudo wget curl build-essential software-properties-common libssl-dev pkg-config libglew-dev git fish RUN apt-get update && apt-get install -y gpg sudo wget curl build-essential software-properties-common libssl-dev pkg-config libglew-dev git fish
# Install handy developer tools. # Install handy developer tools.
RUN apt-get install -y iputils-ping postgresql-client git-delta jq sqlite3 vim pipx ripgrep openssh-server RUN apt-get update && apt-get install -y iputils-ping postgresql-client git-delta jq sqlite3 vim pipx ripgrep openssh-server
# Install and configure Podman. # Install and configure Podman.
RUN apt-get install -y iptables podman RUN apt-get update && apt-get install -y iptables podman
# Podman doesn't use IPv6, so we only need to update the path for the IPv4 executable. # Podman doesn't use IPv6, so we only need to update the path for the IPv4 executable.
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy RUN update-alternatives --set iptables /usr/sbin/iptables-legacy
COPY --chown=root ./assets/podman/containers.conf /etc/containers/containers.conf COPY --chown=root ./assets/podman/containers.conf /etc/containers/containers.conf
@ -82,5 +82,12 @@ ENV DELTA_FEATURES='side-by-side navigate'
ENV COLORTERM=truecolor ENV COLORTERM=truecolor
ENV SHELL=fish ENV SHELL=fish
# Always keep packages upgraded to latest versions.
ARG CACHEBUST=1
USER root
RUN echo "$CACHEBUST" > /dev/null && apt-get update && apt-get upgrade
USER $USERNAME
RUN mise upgrade
# Pop the user into the Fish shell by default. # Pop the user into the Fish shell by default.
CMD /usr/bin/fish CMD /usr/bin/fish

View file

@ -38,6 +38,7 @@ if set -ql _flag_no_cache
--build-arg "USERNAME=$_flag_username" \ --build-arg "USERNAME=$_flag_username" \
--build-arg "VCS_EMAIL=$_flag_email" \ --build-arg "VCS_EMAIL=$_flag_email" \
--build-arg "VCS_NAME=$_flag_full_name" \ --build-arg "VCS_NAME=$_flag_full_name" \
--build-arg "CACHEBUST=$(date +%s)" \
. .
else else
container build -t "$_flag_tag" \ container build -t "$_flag_tag" \
@ -45,5 +46,6 @@ else
--build-arg "USERNAME=$_flag_username" \ --build-arg "USERNAME=$_flag_username" \
--build-arg "VCS_EMAIL=$_flag_email" \ --build-arg "VCS_EMAIL=$_flag_email" \
--build-arg "VCS_NAME=$_flag_full_name" \ --build-arg "VCS_NAME=$_flag_full_name" \
--build-arg "CACHEBUST=$(date +%s)" \
. .
end end