Update Image users

This commit is contained in:
Fijxu 2024-03-23 15:50:14 -03:00
parent 431cdf4738
commit 5597d10b13
No known key found for this signature in database
GPG key ID: 32C1DDF333EDA6A4
4 changed files with 24 additions and 23 deletions

View file

@ -1,9 +1,10 @@
name: 'Suyu Docker Image CI'
on:
# workflow_dispatch:
# inputs: {}
# schedule:
# - cron: '0 7 * * 0'
# workflow_dispatch:
# inputs: {}
schedule:
- cron: '0 7 * * 0'
push:
branches: ["dev"]
pull_request:
@ -21,14 +22,14 @@ jobs:
- uses: https://github.com/actions/checkout@v2
- uses: https://github.com/docker/setup-buildx-action@v1
name: Setup Docker BuildX system
- name: Login to the Suyu Package Registry
- name: Login to Docker Container Registry
uses: https://github.com/docker/login-action@v1
if: (github.ref == 'refs/heads/dev') && (github.repository == 'suyu/build-environments')
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- uses: https://github.com/docker/build-push-action@v2
name: Build image
name: Build images
with:
push: ${{ (github.ref == 'refs/heads/dev') && (github.repository == 'suyu/build-environments') }}
context: ${{ matrix.image }}

View file

@ -1,7 +1,7 @@
FROM ubuntu:20.04
LABEL maintainer="suyu"
# Create a user account yuzu (UID 1027) that the container will run as
RUN useradd -m -u 1027 -s /bin/bash yuzu && \
# Create a user account suyu (UID 1027) that the container will run as
RUN useradd -m -u 1027 -s /bin/bash suyu && \
apt-get update && apt-get -y full-upgrade && \
apt-get install -y git gpg-agent wget && \
wget https://apt.llvm.org/llvm-snapshot.gpg.key && apt-key add ./llvm-snapshot.gpg.key && \

View file

@ -11,8 +11,8 @@ ENV QT_PKG_VER=515
ENV QT_VER=5.15.2
ENV UBUNTU_VER=focal
# Create a user account yuzu (UID 1027) that the container will run as
RUN useradd -m -u 1027 -s /bin/bash yuzu && \
# Create a user account suyu (UID 1027) that the container will run as
RUN useradd -m -u 1027 -s /bin/bash suyu && \
apt-get update && \
apt-get full-upgrade -y && \
apt-get install --no-install-recommends -y \
@ -23,7 +23,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && \
unzip \
wget \
xz-utils \
# yuzu build requirements
# suyu build requirements
build-essential \
ccache \
git \
@ -104,7 +104,7 @@ RUN cd /tmp && \
cp -rv cmake-${CMAKE_VER}-linux-x86_64/* /usr && \
rm -rf cmake-*
# Install Boost from yuzu-emu/ext-linux-bin
# Install Boost from suyu/ext-linux-bin
RUN cd /tmp && \
wget --no-verbose https://git.suyu.dev/suyu/ext-linux-bin/raw/main/boost/boost-${BOOST_VER}.tar.xz && \
tar xvf boost-${BOOST_VER}.tar.xz && \
@ -112,7 +112,7 @@ RUN cd /tmp && \
cp -rv boost-${BOOST_VER}/usr / && \
rm -rf boost*
# Install GCC from yuzu-emu/ext-linux-bin
# Install GCC from suyu/ext-linux-bin
RUN cd /tmp && \
wget --no-verbose \
https://git.suyu.dev/suyu/ext-linux-bin/raw/main/gcc/gcc-${GCC_VER}-ubuntu.tar.xz.aa \
@ -131,7 +131,7 @@ RUN cd /tmp && \
ln -sv /usr/local/lib/gcc/x86_64-pc-linux-gnu/${GCC_VER} /usr/lib/gcc/x86_64-linux-gnu/${GCC_VER} && \
cp -rv /usr/local/include/c++/${GCC_VER}/x86_64-pc-linux-gnu/* /usr/local/include/c++/${GCC_VER}/
# Install GNU binutils from yuzu-emu/ext-linux-bin
# Install GNU binutils from suyu/ext-linux-bin
RUN cd /tmp && \
wget --no-verbose \
https://git.suyu.dev/suyu/ext-linux-bin/raw/main/binutils/binutils-${GNU_BIN_VER}-${UBUNTU_VER}.tar.xz && \
@ -149,11 +149,11 @@ RUN patch /opt/qt515/include/QtConcurrent/qtconcurrentthreadengine.h /opt/qt515/
rm /opt/qt515/qtconcurrentthreadengine.patch
# Tell CMake to use vcpkg when looking for packages
ENV VCPKG_TOOLCHAIN_FILE=/home/yuzu/vcpkg/scripts/buildsystems/vcpkg.cmake
ENV VCPKG_TOOLCHAIN_FILE=/home/suyu/vcpkg/scripts/buildsystems/vcpkg.cmake
USER 1027
# Install vcpkg and required dependencies for yuzu
RUN cd /home/yuzu &&\
# Install vcpkg and required dependencies for suyu
RUN cd /home/suyu &&\
git clone --depth 1 https://github.com/Microsoft/vcpkg.git &&\
cd vcpkg &&\
./bootstrap-vcpkg.sh &&\

View file

@ -4,7 +4,7 @@ LABEL maintainer="suyu"
# Add mingw-repo "ownstuff" is a AUR with an up to date mingw64
# Runs pacman -Syu twice in order to work around pacman issues where the first run only updates the
# current distro packages, and the second run actually pulls the updates from the repos.
RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \
RUN useradd -m -u 1027 -s /bin/bash suyu && mkdir -p /tmp/pkgs && \
echo "[ownstuff]" >> /etc/pacman.conf && \
echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf && \
echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf && \
@ -20,7 +20,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \
wget \
git \
glslang \
# TODO: Remove python-pip after a reasonable amount of time has passed to let yuzu PRs rebase its scripts
# TODO: Remove python-pip after a reasonable amount of time has passed to let suyu PRs rebase its scripts
python-pefile \
python-pip \
python \
@ -48,7 +48,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \
pacman -Scc --noconfirm && \
rm -rf /usr/share/man/ /tmp/* /var/tmp/ /usr/{i686-w64-mingw32,lib32} /usr/lib/gcc/i686-w64-mingw32
# Install Boost from yuzu-emu/ext-linux-bin
# Install Boost from suyu/ext-linux-bin
RUN wget --no-verbose \
https://git.suyu.dev/suyu/ext-linux-bin/raw/main/mingw/mingw-w64-boost-1.79.0-1-any.pkg.tar.zst && \
pacman -U --noconfirm mingw-w64-boost-1.79.0-1-any.pkg.tar.zst && \
@ -56,8 +56,8 @@ RUN wget --no-verbose \
# Compatibility with the old Ubuntu MingW image
RUN ln -s /usr/x86_64-w64-mingw32/lib/qt /usr/x86_64-w64-mingw32/lib/qt5
# Give yuzu user sudo access for AUR usage
RUN echo "yuzu ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
# Give suyu user sudo access for AUR usage
RUN echo "suyu ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
USER 1027
@ -88,5 +88,5 @@ RUN \
makepkg -si --noconfirm --noprogressbar --nocheck && \
# cleanup
cd && rm -rf mingw-* && \
sudo sed -i 's/yuzu/#yuzu/g' /etc/sudoers
sudo sed -i 's/suyu/#suyu/g' /etc/sudoers