-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
!autobuild.sh | ||
!configure.ac | ||
!Makefile.am | ||
!src/** | ||
!.git/** | ||
!src/*.c | ||
!src/*.h | ||
!src/Makefile.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
##### | ||
FROM alpine AS build-env | ||
RUN apk add --no-cache util-linux-dev gcc autoconf automake make openssl-dev json-c-dev musl-dev git | ||
RUN apk add --no-cache util-linux-dev gcc autoconf automake make openssl-dev json-c-dev musl-dev | ||
|
||
ADD . /work | ||
WORKDIR /work | ||
|
||
RUN ./autobuild.sh | ||
ARG GIT_VERSION | ||
RUN GIT_VERSION=${GIT_VERSION:-unknown} ./autobuild.sh | ||
|
||
##### | ||
FROM alpine | ||
ARG GIT_VERSION | ||
LABEL version=${GIT_VERSION:-unknown} | ||
RUN apk add --no-cache libuuid json-c | ||
COPY --from=build-env /work/src/rmbt /bin/rmbt | ||
ENTRYPOINT ["/bin/rmbt"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
set -e | ||
[ -e configure ] || autoreconf -i | ||
[ -e Makefile ] || ( ./configure && make ) | ||
[ -e src/rmbt ] || make | ||
[ -e Makefile ] || ./configure | ||
make ${GIT_VERSION:+GIT_VERSION="$GIT_VERSION"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
docker build --build-arg "GIT_VERSION=$(git describe --abbrev=9 --dirty --always --tags --long 2> /dev/null)" -t rmbt . |