Show More
@@ -1,4 +1,4 b'' | |||||
1 |
FROM fedora: |
|
1 | FROM fedora:%OS_RELEASE% | |
2 |
|
2 | |||
3 | RUN groupadd -g 1000 build && \ |
|
3 | RUN groupadd -g 1000 build && \ | |
4 | useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build |
|
4 | useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build |
@@ -6,6 +6,14 b' export ROOTDIR=$(cd $BUILDDIR/../..; pwd' | |||||
6 | PLATFORM="$1" |
|
6 | PLATFORM="$1" | |
7 | shift # extra params are passed to buildrpm |
|
7 | shift # extra params are passed to buildrpm | |
8 |
|
8 | |||
|
9 | DOCKERFILE="$PLATFORM" | |||
|
10 | OS_RELEASE="${PLATFORM//[a-z]/}" | |||
|
11 | case "$PLATFORM" in | |||
|
12 | fedora*) | |||
|
13 | DOCKERFILE="${PLATFORM//[0-9]/}.template" | |||
|
14 | ;; | |||
|
15 | esac | |||
|
16 | ||||
9 | DOCKER=$($BUILDDIR/hg-docker docker-path) |
|
17 | DOCKER=$($BUILDDIR/hg-docker docker-path) | |
10 |
|
18 | |||
11 | CONTAINER=hg-docker-$PLATFORM |
|
19 | CONTAINER=hg-docker-$PLATFORM | |
@@ -18,7 +26,11 b' else' | |||||
18 | DOCKERGID=$(id -g) |
|
26 | DOCKERGID=$(id -g) | |
19 | fi |
|
27 | fi | |
20 |
|
28 | |||
21 | $BUILDDIR/hg-docker build --build-arg UID=$DOCKERUID --build-arg GID=$DOCKERGID $BUILDDIR/docker/$PLATFORM $CONTAINER |
|
29 | $BUILDDIR/hg-docker build \ | |
|
30 | --build-arg UID=$DOCKERUID \ | |||
|
31 | --build-arg GID=$DOCKERGID \ | |||
|
32 | --build-arg OS_RELEASE=${OS_RELEASE:-latest} \ | |||
|
33 | $BUILDDIR/docker/$DOCKERFILE $CONTAINER | |||
22 |
|
34 | |||
23 | RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM |
|
35 | RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM | |
24 | mkdir -p $RPMBUILDDIR |
|
36 | mkdir -p $RPMBUILDDIR |
General Comments 0
You need to be logged in to leave comments.
Login now