From cab67196dc458c84a3445173a15a4e1c184e9eaa Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 8 Aug 2018 14:40:42 +0200 Subject: added ffmpeg app image diff --git a/_build.sh b/_build.sh new file mode 100755 index 0000000..35da7a3 --- /dev/null +++ b/_build.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +img_name="$1" +shift +build_dir="$1" +shift + +function print_usage { + echo "" + echo "Usage: $0 [ .. ]" + echo "" + echo " for example:" + echo " $0 docker.helsinki.at/debian:stretch debian/stretch/ --no-cache" + echo " will run:" + echo " docker build -t docker.helsinki.at/debian:stretch --no-cache debian/stretch/" + echo "" +} + +if [ -z "$img_name" ] || [ -z "$build_dir" ]; then + print_usage + exit 1 +fi + +if [ ! -d "$build_dir" ]; then + echo "Error: '$build_dir' is not a directory" + exit 1 +fi + +set -e + +BASE_D="${BASH_SOURCE%/*}" +STAGING_D=$(mktemp -d -t rh-docker-build.XXXX) + +function cleanup { + rm -rf "$STAGING_D" +} +trap cleanup EXIT + +cp -r "$build_dir" "$STAGING_D" +BUILD_D="$STAGING_D"/$(basename "$build_dir") +cp -r "$BASE_D/common" "$BUILD_D/" + + +if [ "$UID" -ne 0 ]; then + exec sudo docker build -t "$img_name" "$@" "$BUILD_D" +fi +exec docker build -t "$img_name" "$@" "$BUILD_D" diff --git a/build-app-images.sh b/build-app-images.sh new file mode 100755 index 0000000..a4368c9 --- /dev/null +++ b/build-app-images.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +BASE_D="${BASH_SOURCE%/*}" + +function run_build { + local img_name="$1" + local img_name_helsinki="docker.helsinki.at/$img_name" + local build_dir="$2" + + echo -e "\033[1m****************\033[0m" + echo -e " \033[1mbuilding: $img_name\033[0m" + echo "" + + "$BASE_D/_build.sh" "$img_name_helsinki" "$BASE_D/$build_dir" + result=$? + + echo "" + if [ "$result" -ne 0 ]; then + echo -e " \033[1;31m*** FAILED ***\033[0m"; + else + echo -e " \033[1;32m*** Success ***\033[0m"; + fi + echo "" +} + +run_build "ffmpeg:bionic" "ffmpeg/bionic" diff --git a/build-os-images.sh b/build-os-images.sh index 9e3421d..a148081 100755 --- a/build-os-images.sh +++ b/build-os-images.sh @@ -20,7 +20,7 @@ function run_build { if [ $result -eq 0 ]; then echo "" - "$BASE_D/build.sh" "$img_name_helsinki" "$BASE_D/$build_dir" + "$BASE_D/_build.sh" "$img_name_helsinki" "$BASE_D/$build_dir" result=$? fi diff --git a/build.sh b/build.sh deleted file mode 100755 index 35da7a3..0000000 --- a/build.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -img_name="$1" -shift -build_dir="$1" -shift - -function print_usage { - echo "" - echo "Usage: $0 [ .. ]" - echo "" - echo " for example:" - echo " $0 docker.helsinki.at/debian:stretch debian/stretch/ --no-cache" - echo " will run:" - echo " docker build -t docker.helsinki.at/debian:stretch --no-cache debian/stretch/" - echo "" -} - -if [ -z "$img_name" ] || [ -z "$build_dir" ]; then - print_usage - exit 1 -fi - -if [ ! -d "$build_dir" ]; then - echo "Error: '$build_dir' is not a directory" - exit 1 -fi - -set -e - -BASE_D="${BASH_SOURCE%/*}" -STAGING_D=$(mktemp -d -t rh-docker-build.XXXX) - -function cleanup { - rm -rf "$STAGING_D" -} -trap cleanup EXIT - -cp -r "$build_dir" "$STAGING_D" -BUILD_D="$STAGING_D"/$(basename "$build_dir") -cp -r "$BASE_D/common" "$BUILD_D/" - - -if [ "$UID" -ne 0 ]; then - exec sudo docker build -t "$img_name" "$@" "$BUILD_D" -fi -exec docker build -t "$img_name" "$@" "$BUILD_D" diff --git a/ffmpeg/bionic/Dockerfile b/ffmpeg/bionic/Dockerfile new file mode 100644 index 0000000..aa04dda --- /dev/null +++ b/ffmpeg/bionic/Dockerfile @@ -0,0 +1,7 @@ +FROM docker.helsinki.at/ubuntu:bionic +MAINTAINER Christian Pointner + +RUN set -x \ + && apt-get update -q \ + && apt-get install -y -q ffmpeg \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -- cgit v0.10.2