forked from restreamio/docker-gstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-latest.sh
More file actions
executable file
·44 lines (33 loc) · 1.21 KB
/
build-latest.sh
File metadata and controls
executable file
·44 lines (33 loc) · 1.21 KB
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
#!/bin/bash
set -e
if [[ $WEBKIT_USE_SCCACHE == '1' ]]; then
sed 's;@@SCCACHE_SCHEDULER@@;'"${SCCACHE_SCHEDULER}"';g' sccache.toml > docker/sccache.toml
sed -i 's;@@SCCACHE_AUTH_TOKEN@@;'"${SCCACHE_AUTH_TOKEN}"';g' docker/sccache.toml
else
echo > docker/sccache.toml
fi
ARCH=$(uname -m)
TAG_BASENAME="restreamio/gstreamer:$ARCH"
docker_build() {
local docker_file="Dockerfile-$1.in"
echo "Building from $docker_file"
sed "s/\$TARGET_ARCH/$ARCH/g" $docker_file > Dockerfile-tmp
docker build -t $TAG_BASENAME-$1 -f Dockerfile-tmp .
rm -f Dockerfile-tmp
}
# Make sure to always have fresh base image
docker pull ubuntu:22.04
# Install dev dependencies
docker build -t $TAG_BASENAME-dev-dependencies -f Dockerfile-dev-dependencies .
# Download source code
docker_build dev-downloaded
# Build dev image with source code included
docker_build latest-dev-with-source
# Build dev image with just binaries
docker_build latest-dev
# Build base production image with necessary dependencies
docker_build prod-base
# Build production image optimized binaries and no debug symbols (-O3 LTO)
docker_build latest-prod
# Build production image optimized binaries and debug symbols
docker_build latest-prod-dbg