Skip to content

Commit 0ade40b

Browse files
committed
Minecraft in Containerfile
1 parent 4dc4849 commit 0ade40b

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

Containerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ COPY cosign.pub /usr/share/ublue-os/cosign.pub
2828
COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms
2929
COPY --from=ghcr.io/ublue-os/bling:latest /files /tmp/bling/files
3030

31+
RUN mkdir minecraftforge && \
32+
cd minecraftforge && \
33+
wget "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.2.0/forge-1.20.1-47.2.0-mdk.zip" -O temp.zip && \
34+
unzip temp.zip && \
35+
rm temp.zip && cd ~
36+
3137
# Copy build scripts & configuration
3238
COPY build.sh /tmp/build.sh
3339
COPY config /tmp/config/

config/recipe.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ modules:
5252
# this sets up the proper policy & signing files for signed images to work
5353
- signing.sh
5454
- minecraft.sh
55+
- scratch.sh

config/scripts/scratch.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
# Tell this script to exit if there are any errors.
4+
# You should have this in every custom script, to ensure that your completed
5+
# builds actually ran successfully without any errors!
6+
set -oue pipefail
7+
rpm-ostree install npm rpm-build
8+
npm install electron --save-dev
9+
npm install electron-installer-redhat
10+
rm -rf /tmp/scratch-desktop
11+
mkdir /tmp/scratch-desktop
12+
wget --max-redirect 5 -c -O /tmp/scratch-desktop.exe 'https://downloads.scratch.mit.edu/desktop/Scratch%20Setup.exe' 7za x -aoa -y /tmp/scratch-desktop.exe -o /tmp/scratch-desktop
13+
cp -rf ~/node_modules/electron/dist/* /tmp/scratch-desktop
14+
ln -fsr /tmp/scratch-desktop/electron /tmp/scratch-desktop/scratch-desktop
15+
chmod 755 /tmp/scratch-desktop/locales
16+
chmod 755 /tmp/scratch-desktop/swiftshader
17+
chmod 755 /tmp/scratch-desktop/resources
18+
chmod 755 /tmp/scratch-desktop/resources/static
19+
chmod 755 /tmp/scratch-desktop/resources/static/assets
20+
wget -c -O /tmp/scratch-desktop/resources/Icon.png 'https://scratch.mit.edu/images/download/icon.png'
21+
wget -c -O /tmp/config-rpm.json 'https://gist.githubusercontent.com/lyshie/0c49393076b8b375ca1bd98c28f95fb0/raw/223cc112d99c3bdc1829fc25b19c260856134a82/config-rpm.json' ~/node_modules/.bin/electron-installer-redhat --config /tpm/config-rpm.json
22+
mv /tmp/scratch-desktop ~/

0 commit comments

Comments
 (0)