forked from streamstorage/docker-gstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-release.sh
executable file
·55 lines (49 loc) · 1.85 KB
/
build-release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
set -ex
ROOT_DIR=$(readlink -f $(dirname $0))
GSTREAMER_REPOSITORY=${GSTREAMER_REPOSITORY:-https://gitlab.freedesktop.org/gstreamer/gstreamer.git}
GSTREAMER_CHECKOUT=${GSTREAMER_CHECKOUT:-1.22.5}
UBUNTU_VERSION=${UBUNTU_VERSION:-22.04}
BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
# Make sure to always have fresh base image
docker pull ${BASE_IMAGE}
if [[ "${BUILD_DEV}" == "1" ]]; then
DOCKER_BUILDKIT=1 docker build \
-t streamstorage/gstreamer:${UBUNTU_VERSION}-${GSTREAMER_CHECKOUT}-dev \
--build-arg GSTREAMER_REPOSITORY=${GSTREAMER_REPOSITORY} \
--build-arg GSTREAMER_CHECKOUT=${GSTREAMER_CHECKOUT} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--target dev \
-f Dockerfile \
${ROOT_DIR}
fi
if [[ "${BUILD_DEV_WITH_SOURCE}" == "1" ]]; then
DOCKER_BUILDKIT=1 docker build \
-t streamstorage/gstreamer:${UBUNTU_VERSION}-${GSTREAMER_CHECKOUT}-dev-with-source \
--build-arg GSTREAMER_REPOSITORY=${GSTREAMER_REPOSITORY} \
--build-arg GSTREAMER_CHECKOUT=${GSTREAMER_CHECKOUT} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--target dev-with-source \
-f Dockerfile \
${ROOT_DIR}
fi
if [[ "${BUILD_PROD}" == "1" ]]; then
DOCKER_BUILDKIT=1 docker build \
-t streamstorage/gstreamer:${UBUNTU_VERSION}-${GSTREAMER_CHECKOUT}-prod \
--build-arg GSTREAMER_REPOSITORY=${GSTREAMER_REPOSITORY} \
--build-arg GSTREAMER_CHECKOUT=${GSTREAMER_CHECKOUT} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--target prod \
-f Dockerfile \
${ROOT_DIR}
fi
if [[ "${BUILD_PROD_DBG}" == "1" ]]; then
DOCKER_BUILDKIT=1 docker build \
-t streamstorage/gstreamer:${UBUNTU_VERSION}-${GSTREAMER_CHECKOUT}-prod-dbg \
--build-arg GSTREAMER_REPOSITORY=${GSTREAMER_REPOSITORY} \
--build-arg GSTREAMER_CHECKOUT=${GSTREAMER_CHECKOUT} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--target prod-dbg \
-f Dockerfile \
${ROOT_DIR}
fi