Skip to content

Commit

Permalink
removed brew
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalderon committed Dec 31, 2023
1 parent 17310fc commit 52aa745
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
38 changes: 19 additions & 19 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM quay.io/toolbx-images/fedora-toolbox:38
ENV HOMEBREW_NO_ENV_HINTS=true

# Add user jim
RUN useradd -m -s /bin/bash jim
# RUN useradd -m -s /bin/bash jim

# Import Microsoft GPG key and add Visual Studio Code repository
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
Expand All @@ -19,26 +19,26 @@ COPY packages.dnf /tmp/packages.dnf
RUN dnf -y install $(cat /tmp/packages.dnf)

# # Sym-link to host binaries
# RUN ln -fs /bin/sh /usr/bin/sh && \
# ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \
# ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \
# 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
RUN ln -fs /bin/sh /usr/bin/sh && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \
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

# Copy the install script and packages file
COPY install_homebrew.sh /home/jim/
COPY packages.brew /home/jim/tmp/
# # Copy the install script and packages file
# COPY install_homebrew.sh /home/jim/
# COPY packages.brew /home/jim/tmp/

# Change ownership to jim and make the script executable
RUN chown -R jim:jim /home/jim/install_homebrew.sh /home/jim/tmp/ && \
chmod u+x /home/jim/install_homebrew.sh
# # Change ownership to jim and make the script executable
# RUN chown -R jim:jim /home/jim/install_homebrew.sh /home/jim/tmp/ && \
# chmod u+x /home/jim/install_homebrew.sh

# Switch to user jim
USER jim
# # Switch to user jim
# USER jim

# Add Homebrew to PATH
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
# # Add Homebrew to PATH
# ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"

# Set the script to run on login
RUN echo '[[ -f $HOME/install_homebrew.sh ]] && /bin/bash $HOME/install_homebrew.sh' >> /home/jim/.bashrc
# # Set the script to run on login
# RUN echo '[[ -f $HOME/install_homebrew.sh ]] && /bin/bash $HOME/install_homebrew.sh' >> /home/jim/.bashrc
5 changes: 5 additions & 0 deletions install_homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ if [ ! -d "/home/linuxbrew/.linuxbrew" ]; then
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /var/home/jim/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

sudo yum groupinstall -y 'Development Tools'

# Install Homebrew applications from the list
brew install $(cat /home/jim/tmp/packages.brew)
fi
Expand Down
1 change: 1 addition & 0 deletions packages.dnf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dnf-plugins-core
tree
neofetch
stow
Expand Down

0 comments on commit 52aa745

Please sign in to comment.