Skip to content

Commit

Permalink
fix: add pacman update commands to each Dockerfile layer (#38)
Browse files Browse the repository at this point in the history
Each layer that runs pacman commands needs to first run `pacman -Syu`
because old caches from past layers can lead to errors when attempting
to install packages.
  • Loading branch information
vicnett authored Nov 17, 2024
1 parent f3bb133 commit de3c144
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ FROM arch-base AS install
# single docker build. Ansible is super slow to install for some reason...
RUN <<-EOF
export USE_EMOJI=0
sudo pacman -Syu --noconfirm
sudo pacman -S --needed --noconfirm python-pipx
pipx install --include-deps ansible
EOF

# Install the packages Ansible will want to install later. There's no need to
# excessively download packages from the Manjaro repo every build...
COPY manjaro_packages .
RUN sudo pacman -S --needed --noconfirm - < manjaro_packages
RUN <<-EOF
sudo pacman -Syu --noconfirm
sudo pacman -S --needed --noconfirm - < manjaro_packages
EOF

FROM install AS copy

Expand Down

0 comments on commit de3c144

Please sign in to comment.