Skip to content

Commit

Permalink
fix: get gpg checking for vscode + ensure docker/podman sockets are e…
Browse files Browse the repository at this point in the history
…nabled (#356)

Just noticed that the docker socket isnt enabled by default on `-dx`, we
want that. And VSCode wasnt getting installed the right way (with gpg
checking) so I just changed the policies and re-changed them to get it
going, it shouldnt affect anything but its best to test this out
eventually
  • Loading branch information
tulilirockz authored Mar 1, 2025
1 parent 94b2eda commit c7c992f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
15 changes: 8 additions & 7 deletions build_scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file needs to exist otherwise running this in a RUN label makes it so bash strict mode doesnt work.
# Thus leading to silent failures

set -euo pipefail
set -eo pipefail

# Do not rely on any of these scripts existing in a specific path
# Make the names as descriptive as possible and everything that uses dnf for package installation/removal should have `packages-` as a prefix.
Expand All @@ -12,7 +12,10 @@ run_buildscripts_for() {
WHAT=$1
shift
# Complex "find" expression here since there might not be any overrides
find "/var/tmp/build_scripts/overrides/$WHAT" -iname "*-*.sh" -type f -maxdepth 1 -print0 | while IFS= read -r -d $'\0' script; do
find "/var/tmp/build_scripts/overrides/$WHAT" -maxdepth 1 -iname "*-*.sh" -type f -print0 | sort --zero-terminated --sort=human-numeric | while IFS= read -r -d $'\0' script ; do
if [ "${CUSTOM_NAME}" != "" ] ; then
WHAT=$CUSTOM_NAME
fi
printf "::group:: ===$WHAT-%s===\n" "$(basename "$script")"
$script
printf "::endgroup::\n"
Expand All @@ -32,11 +35,9 @@ SCRIPTS_PATH="$(realpath "$(dirname "$0")/scripts")"
export SCRIPTS_PATH
export MAJOR_VERSION_NUMBER

for script in /var/tmp/build_scripts/*-*.sh; do
printf "::group:: ===%s===\n" "$(basename "$script")"
$script
printf "::endgroup::\n"
done
CUSTOM_NAME="base"
run_buildscripts_for ..
CUSTOM_NAME=""

copy_systemfiles_for "$(arch)"
run_buildscripts_for "$(arch)"
Expand Down
9 changes: 4 additions & 5 deletions build_scripts/overrides/dx/00-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ dnf install -y \
# VSCode on the base image!
dnf config-manager --add-repo "https://packages.microsoft.com/yumrepos/vscode"
dnf config-manager --set-disabled packages.microsoft.com_yumrepos_vscode
# TODO: Add the key from https://packages.microsoft.com/keys/microsoft.asc somehow
# rpm --import https://packages.microsoft.com/keys/microsoft.asc fails for some reason.
dnf -y --enablerepo packages.microsoft.com_yumrepos_vscode --nogpgcheck install code
update-crypto-policies --set LEGACY
rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf -y --enablerepo packages.microsoft.com_yumrepos_vscode install code
update-crypto-policies --set DEFAULT

dnf config-manager --add-repo "https://download.docker.com/linux/centos/docker-ce.repo"
dnf config-manager --set-disabled docker-ce-stable
Expand All @@ -23,5 +24,3 @@ dnf -y --enablerepo docker-ce-stable install \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin

systemctl enable docker
6 changes: 6 additions & 0 deletions build_scripts/overrides/dx/20-services.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -xeuo pipefail

systemctl enable podman.socket
systemctl enable docker.socket

0 comments on commit c7c992f

Please sign in to comment.