Skip to content

Commit

Permalink
using fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalderon committed Dec 31, 2023
1 parent b8d42c2 commit d534dc0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 52 deletions.
67 changes: 22 additions & 45 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,33 @@
# FROM quay.io/toolbx-images/fedora-toolbox:38
# FROM ghcr.io/homebrew/brew:latest
FROM quay.io/toolbx-images/ubuntu-toolbox:23.10
# Start from the Fedora Toolbox image
FROM quay.io/toolbx-images/fedora-toolbox:38
ENV HOMEBREW_NO_ENV_HINTS=true

# Copy the brew-install file into the container
COPY brew-install /tmp/brew-install
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
RUN sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'

# Copy the apt-install file into the container
COPY apt-install /tmp/apt-install
# Update the system
RUN dnf -y update && dnf -y upgrade

# USER root
# Copy the list of packages into the container
COPY packages.dnf /tmp/packages.dnf

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# apt install
RUN apt-get update && \
apt-get install -y \
wget \
gpg \
gnupg
# Install packages from the list
RUN dnf -y install $(cat /tmp/packages.dnf)
# RUN dnf groupinstall "Development Tools"

# Download and install the Microsoft GPG key
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# Install Homebrew
# RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

RUN install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# Add Homebrew to PATH
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"

RUN sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# rm -f packages.microsoft.gpg
# Copy the list of Homebrew applications into the container
# COPY packages.brew /tmp/packages.brew

# Install packages from the apt-install list
RUN apt-get update
RUN xargs -a /tmp/apt-install apt-get install -y

# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/apt-install

# ####################################################################################
# USER linuxbrew
# ENV HOMEBREW_NO_ENV_HINTS=true

# # Install packages from the brew-install list
# RUN while read -r package; do brew install "$package"; done < /tmp/brew-install

# ####################################################################################
# USER root

# install 'just'
# RUN git clone 'https://mpr.makedeb.org/just' && \
# cd just && \
# makedeb -si
# Install Homebrew applications from the list
# RUN while read app; do brew install "$app"; done < /tmp/packages.brew
# RUN brew install $(cat /tmp/packages.brew)

# sym-link to host binaries
RUN ln -fs /bin/sh /usr/bin/sh && \
Expand All @@ -56,6 +36,3 @@ RUN ln -fs /bin/sh /usr/bin/sh && \
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



7 changes: 0 additions & 7 deletions apt-install

This file was deleted.

5 changes: 5 additions & 0 deletions brew.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Loop through each line in /tmp/packages.brew and install the app using brew
while read app; do
brew install "$app"
done < /tmp/packages.brew
File renamed without changes.
5 changes: 5 additions & 0 deletions packages.dnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tree
neofetch
stow
code
code-insiders

0 comments on commit d534dc0

Please sign in to comment.