-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
23 additions
and
5 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 @@ | ||
FROM java | ||
LABEL maintainer "AmrAbed@vt.edu" | ||
|
||
WORKDIR /tmp/rhids | ||
|
||
COPY rhids /usr/bin/rhids | ||
COPY src src | ||
COPY gradle gradle | ||
COPY build.gradle gradlew ./ | ||
|
||
RUN ./gradlew createJar && cp build/libs/*.jar /usr/bin/rhids/rhids.jar | ||
|
||
ENV PATH $PATH:/usr/bin/rhids | ||
|
||
VOLUME /usr/log/strace-docker | ||
VOLUME /var/log/rhids | ||
|
||
ENTRYPOINT ["rhids"] | ||
|
||
CMD ["-h"] |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
|
||
time=$(date +%Y%m%d%H%M%S) | ||
cd "$(dirname "$0")" && sudo java -jar rhids.jar $@ | sudo tee /var/log/rhids/output-$time | ||
[ $(id -u) -ne 0 ] && echo "RHIDS needs to run as root" && exit 1 | ||
|
||
cd "$(dirname "$0")" && java -jar rhids.jar $@ | tee /var/log/rhids/output-$(date +%Y%m%d%H%M%S) | ||
|