forked from MediaBrowser/Emby.Build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworking docker build and kiwi images
- Loading branch information
Carlos Hernandez
committed
May 18, 2017
1 parent
a34581f
commit 986507b
Showing
52 changed files
with
141 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,9 @@ | ||
FROM opensuse/amd64:tumbleweed | ||
FROM scratch | ||
MAINTAINER Carlos Hernandez <carlos@techbyte.ca> | ||
ARG ARCH=x86_64 | ||
ENV LC_ALL="C.utf8" | ||
|
||
ENV LANG="en_US.UTF-8" s6_overlay_version="1.19.1.1" | ||
|
||
RUN zypper --non-interactive ar -f -n repo-emby http://download.opensuse.org/repositories/home:emby/openSUSE_Tumbleweed repo-emby \ | ||
&& zypper --gpg-auto-import-keys ref \ | ||
&& zypper --non-interactive update --no-recommends \ | ||
&& zypper --non-interactive in --no-recommends \ | ||
at \ | ||
ca-certificates{,-cacert,-mozilla} \ | ||
curl \ | ||
dejavu-fonts \ | ||
embymagick \ | ||
glibc-locale \ | ||
libembysqlite3-0 \ | ||
libHX28 \ | ||
mono-core \ | ||
mono-data \ | ||
mono-data-sqlite \ | ||
mono-extras \ | ||
mono-mvc \ | ||
mono-wcf \ | ||
mono-wcf \ | ||
mono-web \ | ||
mono-winfxcore \ | ||
sudo \ | ||
tar \ | ||
timezone \ | ||
xz \ | ||
&& curl -L https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-amd64.tar.gz -o /tmp/s6-overlay-amd64.tar.gz \ | ||
&& tar zvxf /tmp/s6-overlay-amd64.tar.gz -C / \ | ||
&& curl -L https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz -o /tmp/ffmpeg.tar.xz \ | ||
&& tar -C /bin --extract --file=/tmp/ffmpeg.tar.xz --wildcards "*/ffmpeg" --strip-components=1 \ | ||
&& tar -C /bin --extract --file=/tmp/ffmpeg.tar.xz --wildcards "*/ffprobe" --strip-components=1 \ | ||
&& rpm -e --nodeps --allmatches --noscripts \ | ||
`rpm -qa | grep aaa_base` \ | ||
`rpm -qa | grep acl | grep -v lib` \ | ||
`rpm -qa | grep branding-openSUSE` \ | ||
`rpm -qa | grep cpio` \ | ||
`rpm -qa | grep cryptsetup` \ | ||
`rpm -qa | grep dracut` \ | ||
`rpm -qa | grep fipscheck` \ | ||
`rpm -qa | grep kbd` \ | ||
`rpm -qa | grep kmod` \ | ||
`rpm -qa | grep mapper` \ | ||
`rpm -qa | grep ncurses-utils` \ | ||
`rpm -qa | grep openSUSE-release` \ | ||
`rpm -qa | grep perl` \ | ||
`rpm -qa | grep pigz` \ | ||
`rpm -qa | grep pinentry` \ | ||
`rpm -qa | grep pkg-config` \ | ||
`rpm -qa | grep qrencode` \ | ||
`rpm -qa | grep sg3_utils` \ | ||
cpio \ | ||
curl \ | ||
&& zypper --non-interactive al dbus-1 kbd kmod systemd systemd-presets-branding-openSUSE udev openSUSE-release-ftp \ | ||
&& zypper cc --all \ | ||
&& rm -rf /var/cache/zypp* \ | ||
&& rm -rf /tmp/* \ | ||
&& rm -rf /var/log/* \ | ||
&& cd /usr/lib/locale \ | ||
&& ls | grep -ve "en_US*" | xargs rm -rf \ | ||
&& cd /usr/share/locale \ | ||
&& find -name '*.mo' | grep -ve "en_US*" | xargs rm -rf | ||
|
||
COPY root / | ||
ADD rootfs.tar.xz / | ||
ADD overlay-common / | ||
ADD overlay-${ARCH} / | ||
COPY usr /usr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,53 @@ | ||
all: build | ||
#!/usr/bin/make -f | ||
|
||
IMG_NAME="emby-base" | ||
SHELL := /bin/bash | ||
IMG_NAME := "emby-base" | ||
IMG_REPO := "emby" | ||
|
||
ifndef APP_REPO | ||
APP_REPO=${USER} | ||
endif | ||
root_repo := "http://download.opensuse.org/repositories/home:/emby:/docker/images/" | ||
qemu_repo := "http://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64" | ||
|
||
help: | ||
@echo "" | ||
@echo "-- Help Menu" | ||
@echo "" | ||
@echo " 1. make base - build the emby-sever base image" | ||
@echo "" | ||
all: armv7l aarch64 x86_64 | ||
.PHONY: all armv7l aarch64 x86_64 end | ||
|
||
clean: | ||
@docker rm -f `docker ps -a | grep "${APP_REPO}/${IMG_NAME}" | awk '{print $$1}'` > /dev/null 2>&1 || exit 0 | ||
@docker rmi `docker images | grep "${APP_REPO}/${IMG_NAME}" | awk '{print $$3}'` > /dev/null 2>&1 || exit 0 | ||
armv7l: ARCH := "armv7l" | ||
aarch64: ARCH := "aarch64" | ||
x86_64: ARCH := "x86_64" | ||
armv7l aarch64 x86_64: | ||
@ echo "Building emby base image for $(ARCH)" | ||
BUILDDIR = /var/tmp/$(IMG_REPO)_$(IMG_NAME)_$(ARCH) | ||
@ if [[ -d $(BUILDDIR) ]]; then \ | ||
rm -rf $(BUILDDIR); \ | ||
fi | ||
mkdir -p $(BUILDDIR) | ||
cp Dockerfile $(BUILDDIR) | ||
cp -r overlay_$(ARCH) $(BUILDDIR)/overlay_$(ARCH) | ||
cp -r overlay_common $(BUILDDIR)/overlay_common | ||
mkdir -p $(BUILDDIR)/usr/bin | ||
$(eval rpm_name := $(shell curl -s $(qemu_repo)/ --list-only | grep qemu-linux | sed -n s%".*>\(qemu-linux-.*rpm\)</a>.*"%"\1"%p | tail -1)) | ||
curl -L $(qemu_repo)/$(rpm_name) -o $(BUILDDIR)/qemu-linux-user.rpm | ||
@ if [[ $(ARCH) == "armv7l" ]]; then \ | ||
rpm2cpio $(BUILDDIR)/qemu-linux-user.rpm | cpio -D $(BUILDDIR) -idmv "*qemu-arm" "*qemu-arm-*"; \ | ||
fi | ||
@ if [[ $(ARCH) == "aarch64" ]]; then \ | ||
rpm2cpio $(BUILDDIR)/qemu-linux-user.rpm | cpio -D $(BUILDDIR) -idmv "*qemu-aarch*"; \ | ||
fi | ||
$(eval rootfs_file := $(shell curl -s $(root_repo) --list-only | sed -n s%".*>\(emby-base.*${ARCH}.*-.*tar.xz\)</a>.*"%"\1"%p | sort -i | head -1)) | ||
curl -L $(root_repo)/$(rootfs_file) -o $(BUILDDIR)/rootfs.tar.xz | ||
@ if [[ $(ARCH) == "x86_64" ]]; then \ | ||
curl -L https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -o $(BUILDDIR)/ffmpeg.tar.xz; \ | ||
else \ | ||
curl -L https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-armhf-static.tar.xz -o $(BUILDDIR)/ffmpeg.tar.xz; \ | ||
fi | ||
tar -C $(BUILDDIR)/usr/bin -xf $(BUILDDIR)/ffmpeg.tar.xz --wildcards "*/ffmpeg" --strip-components=1 | ||
tar -C $(BUILDDIR)/usr/bin -xf $(BUILDDIR)/ffmpeg.tar.xz --wildcards "*/ffprobe" --strip-components=1 | ||
@ if [[ ! -e /proc/sys/fs/binfmt_misc/arm || ! -e /proc/sys/fs/binfmt_misc/aarch64 ]]; then \ | ||
docker run --rm --privileged emby/qemu-builder:register; \ | ||
fi | ||
cd $(BUILDDIR) && \ | ||
docker build --build-arg ARCH=$(ARCH) --rm=true --tag=$(IMG_REPO)/$(IMG_NAME):$(ARCH) . | ||
#rm -rf $(BUILDDIR) | ||
#docker push $(IMG_REPO)/$(IMG_NAME):$(ARCH) | ||
|
||
build: | ||
@docker build \ | ||
--rm=true \ | ||
--tag=${APP_REPO}/${IMG_NAME} . | ||
|
||
base: build | ||
end: | ||
@echo "Done!" |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
docker-containers/base/overlay-aarch64/etc/zypp/repos.d/oss.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[oss] | ||
name=openSUSE-Tumbleweed-Oss | ||
enabled=1 | ||
autorefresh=1 | ||
baseurl=http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/ | ||
path=/ | ||
type=yast2 | ||
keeppackages=0 |
7 changes: 7 additions & 0 deletions
7
docker-containers/base/overlay-armv7l/etc/zypp/repos.d/emby.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[home_emby] | ||
name=emby's Home Project (openSUSE_Factory_ARM) | ||
type=rpm-md | ||
baseurl=http://download.opensuse.org/repositories/home:/emby/openSUSE_Factory_ARM/ | ||
gpgcheck=1 | ||
gpgkey=http://download.opensuse.org/repositories/home:/emby/openSUSE_Factory_ARM//repodata/repomd.xml.key | ||
enabled=1 |
8 changes: 8 additions & 0 deletions
8
docker-containers/base/overlay-armv7l/etc/zypp/repos.d/oss.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[oss] | ||
name=openSUSE-Tumbleweed-Oss | ||
enabled=1 | ||
autorefresh=1 | ||
baseurl=http://download.opensuse.org/ports/armv7hl/tumbleweed/repo/oss/ | ||
path=/ | ||
type=yast2 | ||
keeppackages=0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
docker-containers/base/overlay-x86_64/etc/zypp/repos.d/emby.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[home_emby] | ||
name=emby's Home Project (openSUSE_Factory_ARM) | ||
type=rpm-md | ||
baseurl=http://download.opensuse.org/repositories/home:/emby/openSUSE_Factory_ARM/ | ||
gpgcheck=1 | ||
gpgkey=http://download.opensuse.org/repositories/home:/emby/openSUSE_Factory_ARM//repodata/repomd.xml.key | ||
enabled=1 |
8 changes: 8 additions & 0 deletions
8
docker-containers/base/overlay-x86_64/etc/zypp/repos.d/non-oss.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[repo-non-oss] | ||
name=openSUSE-Tumbleweed-Non-Oss | ||
enabled=1 | ||
autorefresh=1 | ||
baseurl=http://download.opensuse.org/tumbleweed/repo/non-oss/ | ||
path=/ | ||
type=yast2 | ||
keeppackages=0 |
8 changes: 8 additions & 0 deletions
8
docker-containers/base/overlay-x86_64/etc/zypp/repos.d/oss.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[repo-oss] | ||
name=openSUSE-Tumbleweed-Oss | ||
enabled=1 | ||
autorefresh=1 | ||
baseurl=http://download.opensuse.org/tumbleweed/repo/oss/ | ||
path=/ | ||
type=yast2 | ||
keeppackages=0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.