Skip to content

Commit

Permalink
DOCKER:BASE - abandoned obs repos for github
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Hernandez committed Jun 1, 2017
1 parent cf32ed1 commit 28f54bd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docker-containers/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM scratch
MAINTAINER Carlos Hernandez <carlos@techbyte.ca>
ARG ARCH=x86_64
ARG ARCH
ENV LC_ALL="C.utf8"

ADD rootfs.tar.xz /
Expand Down
7 changes: 3 additions & 4 deletions docker-containers/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ armv7 aarch64 x86_64:
tar -C $(BUILDDIR)/usr/bin -xf $(BUILDDIR)/ffmpeg.tar.xz --wildcards "*/ffprobe" --strip-components=1
cd $(BUILDDIR) && \
docker build --build-arg ARCH=$(ARCH) --rm=true --tag=$(IMG_REPO)/$(IMG_NAME):$(ARCH) .
docker push $(IMG_REPO)/$(IMG_NAME):$(ARCH)
@ if [[ $(ARCH) == "x86_64" ]]; then \
docker tag $(IMG_REPO)/$(IMG_NAME):$(ARCH) $(IMG_REPO)/$(IMG_NAME):latest; \
docker push $(IMG_REPO)/$(IMG_NAME):$(ARCH)
fi

clean:
rm -rf $(BUILDDIR)

push:
docker push $(IMG_REPO)/$(IMG_NAME)

end:
@echo "Done!"
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ if [[ -e /dev/dri ]]; then
if ! getent group ${video_gid} > /dev/null; then
groupadd -f -g ${video_gid} embyvideo
fi
usermod -aG ${video_gid} emby
usermod -aG ${video_gid} ${APP_USER}
done
fi
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
# vim:set ft=sh sw=2 sts=2 st=2 et:

EDGE=${EDGE:-0}
STABLE=${STABLE:-1}

if [[ $EDGE -eq 1 ]]; then
echo "Updating ${APP_NAME}..."
zypper --quiet --non-interactive ref &> /dev/null
zypper --quiet --non-interactive up --no-recommends ${PKG_NAME} &> /dev/null
zypper cc --all &> /dev/null
rm -rf /var/cache/zypp*
if [[ $STABLE -eq 1 ]]; then
RELEASE_VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep -v 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
else
RELEASE_VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
fi
curl -o /var/tmp/emby.zip -L https://github.com/MediaBrowser/Emby/releases/download/${RELEASE_VERSION}/Emby.Mono.zip
mkdir /usr/lib/emby-server/bin
unzip /var/tmp/emby.zip -d /usr/lib/emby-server/bin
fi
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cleanup_stopped_instances() {
for c in $(${SUDO} docker ps -a -q)
do
image=$(${SUDO} docker inspect --format="{{.Config.Image}}" ${c})
if [[ ${image} == "${APP_REPO}/${IMG_NAME}:${TAG_NAME}" ]]; then
if [[ $(echo "${image}" | grep -c -e "${APP_REPO}/embyserver.*${TAG_NAME}") -gt 0 ]]; then
running=$(${SUDO} docker inspect --format="{{.State.Running}}" ${c})
if [[ ${running} != true ]]; then
echo "Cleaning up stopped ${APP_NAME} instances..."
Expand Down

0 comments on commit 28f54bd

Please sign in to comment.