Skip to content

Commit

Permalink
separate aur packages
Browse files Browse the repository at this point in the history
  • Loading branch information
trevnels committed Jan 29, 2024
1 parent eb84d70 commit 7f4203c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
29 changes: 25 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,41 @@ LABEL com.github.containers.toolbox="true" \
usage="This image is meant to be used with the toolbox or distrobox command" \
summary="My personal distrobox development environment"

# install packages
COPY extra-packages /
RUN paru -Syu --noconfirm && \
paru -S --needed - < /extra-packages
RUN rm /extra-packages
COPY aur-packages /

RUN paru -Syu --noconfirm
RUN paru -S --noconfirm --needed $(cat /extra-packages)

USER build
WORKDIR /home/build
RUN paru -S --noconfirm --needed $(cat /aur-packages)

USER root
WORKDIR /

RUN rm /extra-packages /aur-packages

# change distrobox cache dir to keep distrobox and host fontconfig caches separate
# prevents fonts from breaking between host and container due to changing paths
RUN echo 'export XDG_CACHE_HOME="$HOME/.cache-distrobox"' > /etc/profile.d/cache-home.sh

# install Bun, and keep npm up to date (npm should be present as part of extra-packages above)
# install ts & its lsp
RUN npm install -g typescript typescript-language-server

RUN ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/transactional-update && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/ujust


# Cleanup
RUN userdel -r build && \
rm -drf /home/build && \
sed -i '/build ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
sed -i '/root ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/*
2 changes: 2 additions & 0 deletions aur-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
visual-studio-code-bin
bun-bin
1 change: 0 additions & 1 deletion extra-packages
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
visual-studio-code-bin
dbus
eza
ffmpeg
Expand Down

0 comments on commit 7f4203c

Please sign in to comment.