mirror of https://github.com/JPyke3/mbp-manjaro
Compare commits
6 Commits
64117508e9
...
e04b4d8213
Author | SHA1 | Date |
---|---|---|
JPyke3 | e04b4d8213 | |
JPyke3 | e9f4d153f6 | |
Jacob Pyke | f829ed0ba1 | |
JPyke3 | 4ad634dad5 | |
JPyke3 | 87a7cefd6c | |
JPyke3 | baa7f8a958 |
31
Dockerfile
31
Dockerfile
|
@ -1,24 +1,27 @@
|
|||
# mbp-manjaro Dockerfile
|
||||
# Author: github.com/JPyke3 <Jacob Pyke, pyke.jacob1@gmail.com>
|
||||
|
||||
FROM manjarolinux/base
|
||||
|
||||
MAINTAINER jpyke3
|
||||
|
||||
# Update System
|
||||
RUN pacman -Syyu --noconfirm
|
||||
RUN [ "pacman", "-Syyu", "--noconfirm" ]
|
||||
|
||||
# Install manjaro-tools and depends
|
||||
RUN pacman -S manjaro-tools-iso-git \
|
||||
manjaro-tools-base-git \
|
||||
manjaro-tools-yaml-git \
|
||||
manjaro-tools-pkg-git \
|
||||
base-devel \
|
||||
git \
|
||||
lsb-release --noconfirm
|
||||
RUN [ "pacman", "-S", "manjaro-tools-iso-git",\
|
||||
"manjaro-tools-base-git",\
|
||||
"manjaro-tools-yaml-git",\
|
||||
"manjaro-tools-pkg-git",\
|
||||
"base-devel",\
|
||||
"git",\
|
||||
"lsb-release",\
|
||||
"--noconfirm" ]
|
||||
|
||||
RUN mkdir ~/.config
|
||||
RUN cp -r /etc/manjaro-tools ~/.config
|
||||
RUN sed -i "s/# use_overlayfs=\"false\"/use_overlayfs=\"false\"/g" ~/.config/manjaro-tools/manjaro-tools.conf
|
||||
# Import my Pacman GPG key
|
||||
RUN [ "pacman-key", "--recv-key", "2BA2DFA128BBD111034F7626C7833DB15753380A", "--keyserver", "keyserver.ubuntu.com" ]
|
||||
|
||||
# Clone the repository into container
|
||||
RUN git clone https://github.com/JPyke3/mbp-manjaro ~/iso-profiles
|
||||
# Clone the repository to the root home dir
|
||||
RUN [ "git", "clone", "https://github.com/JPyke3/mbp-manjaro", "/root/iso-profiles"]
|
||||
|
||||
RUN pacman-key --recv-key 2BA2DFA128BBD111034F7626C7833DB15753380A --keyserver keyserver.ubuntu.com
|
||||
ENTRYPOINT buildiso -f -p $EDITION -k $KERNEL -t /root/out
|
||||
|
|
33
README.md
33
README.md
|
@ -215,6 +215,39 @@ sudo bash -c "echo 2 > /sys/class/input/*/device/fnmode"
|
|||
|
||||
## Building for yourself
|
||||
|
||||
### Option 1: Docker
|
||||
First, you need to ensure that docker isn't using `overlay` or `overlay2` filesystems. This can be verified by running `docker info`. And will be shown next to `Storage Driver`.
|
||||
|
||||
In the event that you are running `overlay`, [Look at this docker documentation](https://docs.docker.com/storage/storagedriver/aufs-driver/) on how to switch to AUFS.
|
||||
|
||||
**Quick Docker Install Script - Tested on Arch**
|
||||
```
|
||||
sh -c "$(curl -fsSL "https://raw.githubusercontent.com/JPyke3/mbp-manjaro/master/build-in-docker.sh")"
|
||||
```
|
||||
|
||||
**Docker Command**
|
||||
|
||||
```
|
||||
docker run --privileged \
|
||||
-v ~/manjaro-mbp-iso:/root/out \
|
||||
--env KERNEL=linux57-mbp\
|
||||
--env EDITION=gnome\
|
||||
jpyke3/mbp-manjaro-buildiso
|
||||
```
|
||||
|
||||
#### Command Breakdown
|
||||
- `--privileged`
|
||||
- This is required for allowing the filesystems to be created. (This is a security risk! Read for yourself the documentation on this flag)
|
||||
- `-v`
|
||||
- Create a folder on your host filesystem to retrieve the compiled files from the container
|
||||
- `--env`
|
||||
- There are two environment variables:
|
||||
- `KERNEL`: This is used for defining which kernel version to use. All packages will follow the `-mbp` naming scheme.
|
||||
- `EDITION`: This is used for defining which edition of manjaro you would like to install.
|
||||
|
||||
|
||||
## Option 2: Manually on an existing Manjaro Install
|
||||
|
||||
First Install Manjaro Tools:
|
||||
```
|
||||
pamac install manjaro-tools-iso git
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
# Author: github.com/jpyke3 <Jacob Pyke, pyke.jacob1@gmail.com>
|
||||
|
||||
# The help screen
|
||||
print_help() {
|
||||
echo " Manjaro MBP Docker Build Scripts"
|
||||
echo ""
|
||||
echo " Example Usage:"
|
||||
echo " build-in-docker -k linux57 -p gnome"
|
||||
echo ""
|
||||
echo " Arguments:"
|
||||
echo " k Specify which kernel version"
|
||||
echo " p Specify which manjaro edition (xfce, gnome, kde, i3, cinnamon, budgie)"
|
||||
echo " h Show this help file"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Function to run the docker commands
|
||||
run_docker() {
|
||||
|
||||
# Docker command
|
||||
docker run --privileged \
|
||||
-v ~/manjaro-mbp-iso:/root/out \
|
||||
--env KERNEL=$KERNEL\
|
||||
--env EDITION=$EDITION\
|
||||
jpyke3/mbp-manjaro-buildiso
|
||||
}
|
||||
|
||||
# Check to make sure docker is installed
|
||||
if [ ! -f /bin/docker ]; then
|
||||
echo "You need to install docker in order to run this script!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Handle input flags
|
||||
while getopts ":k:p:h:" opt; do
|
||||
# Read the options from the flags
|
||||
case $opt in
|
||||
k)
|
||||
KERNEL=$OPTARG
|
||||
;;
|
||||
p)
|
||||
EDITION=$OPTARG
|
||||
;;
|
||||
h)
|
||||
print_help
|
||||
;;
|
||||
:)
|
||||
if [ $OPTARG == "h" ]; then
|
||||
print_help
|
||||
else
|
||||
echo "Option -$OPTARG requires an argument!"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if the two environment variables are set
|
||||
if [ ! -z "$KERNEL" ] && [ ! -z "$EDITION" ]; then
|
||||
run_docker
|
||||
else
|
||||
echo "You need to run this script with a Kernel Argument and an Edition"
|
||||
echo "For more information use the -h flag for help"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue