-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
37 lines (26 loc) · 931 Bytes
/
Dockerfile
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
#!/usr/bin/docker
# Repository: https://github.com/axonasif/rusty-magisk
# Author: https://githum.com/sickcodes
# License: GPLv3+
# docker build -t rusty-magisk .
# docker run -it -v "${PWD}/ramdisk.img:/image" rusty-magisk
FROM archlinux:base-devel
MAINTAINER 'https://github.com/sickcodes' <https://sick.codes>
SHELL ["/bin/bash", "-c"]
USER root
ENV USER=root
ENV VERSION=v0.1.7
RUN yes | pacman -Syyu \
&& yes | pacman -S cpio wget --noconfirm
RUN mkdir /ramdisk
WORKDIR /ramdisk
CMD cp /image /image.bak \
&& { zcat /image | cpio -iud \
&& mv /ramdisk/init /ramdisk/init.real \
&& wget -O /ramdisk/init "https://github.com/axonasif/rusty-magisk/releases/download/${VERSION}/rusty-magisk_x86_64" \
&& chmod a+x /ramdisk/init \
&& touch /image \
&& cd /ramdisk \
&& find . | cpio -o -H newc | gzip > /image \
&& echo "Success." ; } \
|| echo "Failed."