-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
if [[ $OSTYPE != "linux-gnu" ]]; then | ||
echo "❌ This script is intended to be run on a Linux system." | ||
exit 1 | ||
fi | ||
|
||
if [[ $# -ge 1 ]]; then | ||
REDUCE_RELEASE_TAG=$1 | ||
else | ||
echo "usage: $0 <REDUCE-RELEASE-TAG>" | ||
fi | ||
|
||
docker build . -f linux_build.Dockerfile -t reduce-build --build-arg REDUCE_RELEASE_TAG="$REDUCE_RELEASE_TAG" | ||
|
||
docker rm -f reducecontainer | ||
docker create -ti --name reducecontainer reduce-build bash | ||
docker cp reducecontainer:/opt/build . | ||
docker rm -f reducecontainer | ||
|
File renamed without changes.
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,23 @@ | ||
FROM ubuntu:18.04 as builder | ||
## USAGE: docker build . -f linux_build.Dockerfile -t reduce-appimage --build-arg REDUCE_RELEASE_TAG=v4.14 | ||
RUN apt-get update && apt-get install -y \ | ||
g++ make cmake \ | ||
curl git | ||
|
||
ENV BUILD_DIR=/opt/build | ||
RUN mkdir -p $BUILD_DIR | ||
|
||
FROM builder as appimage | ||
ARG REDUCE_RELEASE_TAG='master' | ||
## Fetch Code | ||
WORKDIR /opt | ||
RUN git clone -b $REDUCE_RELEASE_TAG --depth 1 https://github.com/rlabduke/reduce | ||
ENV REPO_ROOT=/opt/reduce | ||
|
||
## Build | ||
WORKDIR $REPO_ROOT | ||
ENV LD_LIBRARY_PATH="$BUILD_DIR/lib" | ||
ENV CPPFLAGS="-I$BUILD_DIR/include" | ||
ENV LDFLAGS="-L$BUILD_DIR/lib" | ||
RUN cmake . -DCMAKE_INSTALL_PREFIX="$BUILD_DIR" | ||
RUN make -j4 && make install |