-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
56 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,11 @@ | ||
FROM debian:bullseye-slim | ||
|
||
RUN apt update -qq && apt upgrade -y && apt install -y wget tar libglib2.0-0 && \ | ||
wget https://github.com/horsicq/DIE-engine/releases/download/3.01/die_lin64_portable_3.01.tar.gz && \ | ||
tar -xzf die_lin64_portable_3.01.tar.gz | ||
|
||
# db update | ||
RUN rm -rf /die_lin64_portable/base/db | ||
COPY ./db /die_lin64_portable/base/db | ||
|
||
ENTRYPOINT ["/die_lin64_portable/diec.sh"] |
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
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,21 @@ | ||
#!/bin/bash | ||
# This will simply take the argument passed to it, | ||
# parse the directory and bind it as a read-only mount point on the container | ||
# and pass in the filename as the argument to diec.sh | ||
# This assumes file target is last argument! | ||
|
||
# Build with: | ||
# docker build . -t horsicq:diec | ||
|
||
TARGET="${@: -1}" # last argument is target file | ||
INPUT_DIR=$(cd $(dirname "$TARGET") && pwd -P) | ||
INPUT_FILE=$(basename $TARGET) | ||
|
||
|
||
if [ "$#" -eq 0 ]; then | ||
docker run -i horsicq:diec | ||
elif [ "$#" -eq 1 ]; then | ||
docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE"; | ||
else | ||
docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE" "${@:1:$#-1}"; | ||
fi |