Skip to content

Commit

Permalink
Add GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Nov 29, 2024
1 parent 9670bde commit d1cd78b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM eclipse-temurin:21-jre-alpine
LABEL maintainer="[email protected]" vendor="KEEP SOLUTIONS"

WORKDIR /KEEPS

RUN mkdir -p /KEEPS/bin && \
mkdir -p /KEEPS/lib

COPY ./target/*.jar /KEEPS/lib/commons-ip-cits-siard.jar
COPY ./bin /KEEPS/bin
RUN chmod +x /KEEPS/bin/commons-ip-cits-siard

ENV PATH="/KEEPS/bin:$PATH"

ENTRYPOINT [ "/bin/sh", "/KEEPS/bin/commons-ip-cits-siard"]
3 changes: 3 additions & 0 deletions docker/bin/commons-ip-cits-siard
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

java -jar /KEEPS/lib/commons-ip-cits-siard.jar "$@"
16 changes: 16 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"

mvn -f "$PROJECT_DIR"/pom.xml clean package -DskipTests -Pcli

# Clean up target folder
rm -rf "$SCRIPT_DIR"/target/*
mkdir -p "$SCRIPT_DIR"/target
# Copy target
cp -r "$PROJECT_DIR"/target/*.jar "$SCRIPT_DIR"/target/commons-ip-cits-siard.jar

docker build -t keeps/commons-ip-cits-siard:latest "$SCRIPT_DIR"

0 comments on commit d1cd78b

Please sign in to comment.