Updated Dockerfile to fit standards, added docker-commands script. Improved the build-in-docker script

This commit is contained in:
JPyke3 2020-09-07 18:48:03 +10:00
parent baa7f8a958
commit 87a7cefd6c
3 changed files with 24 additions and 20 deletions

View File

@ -6,19 +6,23 @@ 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
# Clone the repository into container
RUN git clone https://github.com/JPyke3/mbp-manjaro ~/iso-profiles
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" ]
# Import my Pacman GPG key
RUN pacman-key --recv-key 2BA2DFA128BBD111034F7626C7833DB15753380A --keyserver keyserver.ubuntu.com
RUN [ "pacman-key", "--recv-key", "2BA2DFA128BBD111034F7626C7833DB15753380A", "--keyserver", "keyserver.ubuntu.com" ]
COPY docker-commands.sh /scripts/docker-commands.sh
RUN ["chmod", "+x", "/scripts/docker-commands.sh"]
ENTRYPOINT [ "/scripts/docker-commands.sh" ]

View File

@ -18,17 +18,12 @@ print_help() {
# Function to run the docker commands
run_docker() {
# Make an out dir for the compiled ISO
mkdir ~/manjaro-mbp-iso
# Docker command
docker run --privileged \
-v ~/manjaro-mbp-iso:/root/out \
jpyke3/mbp-manjaro-buildiso\
buildiso -f\
-p $EDITION\
-k $KERNEL\
-t /root/out
-e KERNEL=$KERNEL
-e EDITION=$EDITION
jpyke3/mbp-manjaro-buildiso
}
# Check to make sure docker is installed

5
docker-commands.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
git clone https://github.com/JPyke3/mbp-manjaro ~/iso-profiles
buildiso -f -p $EDITION -k $KERNEL -t /root/out