Skip to content

Commit

Permalink
fix: arch base to rocky 9 base
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpeterswa committed May 31, 2024
1 parent bad233f commit 4876ec0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 41 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# archlinux is rolling release, not specifying version
# hadolint ignore=DL3006
FROM --platform=$BUILDPLATFORM archlinux as stage1
FROM --platform=$BUILDPLATFORM rockylinux:9 as stage1

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ setup:

.PHONY: hooks
hooks:
@git config --local core.hooksPath .githooks/
@git config --local core.hooksPath .githooks/

.PHONY: start-and-enter
start-and-enter:
BUILDKIT_PROGRESS=plain docker-compose build --no-cache
docker-compose up -d
docker-compose exec konnect zsh
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version: "3.3"
services:
konnect:
build: .
command: sleep infinity
command: sleep infinity
8 changes: 0 additions & 8 deletions scripts/aurlist.txt

This file was deleted.

6 changes: 2 additions & 4 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

# Address Security Concerns
pacman-key --init
dnf update -y

# Update All Packages
pacman -Syu --noconfirm
dnf install epel-release -y
36 changes: 15 additions & 21 deletions scripts/install_packages.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
#!/bin/bash

# Install packages from pkglist.txt
pacman -S --needed --noconfirm - < scripts/pkglist.txt
dnf install -y $(cat /scripts/pkglist.txt)

# Yay temporary build directory and user creation
mkdir -p /tmp/yay-build
useradd -m -G wheel builder && passwd -d builder
chown -R builder:builder /tmp/yay-build
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

# Install yay
su - builder -c "git clone https://aur.archlinux.org/yay.git /tmp/yay-build/yay"
su - builder -c "cd /tmp/yay-build/yay && makepkg -si --noconfirm"

# Remove yay temporary build directory
# rm -rf /tmp/yay-build

# Add non-root user captain
# useradd -m -G wheel captain && passwd -d captain

# Install packages from aurlist.txt
yay -S --noconfirm - < /scripts/aurlist.txt
unamestr=$(uname -m)

# Install evans
unamestr=$(uname -m)
if [ "$unamestr" = "x86_64" ]; then
curl -sSLO https://github.com/ktr0731/evans/releases/download/v0.10.11/evans_linux_amd64.tar.gz
tar -xvzf evans_linux_amd64.tar.gz
Expand All @@ -34,4 +15,17 @@ elif [ "$unamestr" = "aarch64" ] || [ $unamestr = "arm64" ]; then
tar -xvzf evans_linux_arm64.tar.gz
mv evans /usr/local/bin
rm -rf evans_linux_arm64.tar.gz
fi

# Install yq
if [ "$unamestr" = "x86_64" ]; then
curl -sSLO https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64.tar.gz
tar -xvzf yq_linux_amd64.tar.gz
mv yq_linux_amd64 /usr/local/bin/yq
rm -rf yq_linux_amd64.tar.gz yq.1 install-man-page.sh
elif [ "$unamestr" = "aarch64" ] || [ $unamestr = "arm64" ]; then
curl -sSLO https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_arm64.tar.gz
tar -xvzf yq_linux_arm64.tar.gz
mv yq_linux_arm64 /usr/local/bin/yq
rm -rf yq_linux_arm64.tar.gz yq.1 install-man-page.sh
fi
9 changes: 6 additions & 3 deletions scripts/pkglist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
base
base-devel
zsh
git
sudo
go
coreutils
redis
jq
fzf
ripgrep
mysql

0 comments on commit 4876ec0

Please sign in to comment.