Skip to content

Commit

Permalink
Merge pull request #134 from EBISPOT/fix-docker-jar-issue
Browse files Browse the repository at this point in the history
Fix docker issue
  • Loading branch information
henrietteharmse authored May 3, 2024
2 parents 7a5b3d1 + 1b75051 commit 4c69f49
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.gz filter=lfs diff=lfs merge=lfs -text
15 changes: 14 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build & publish zooma images
on:
push:
branches: [ "dev", "stable" ]
pull_request:
branches:
- dev

env:
REGISTRY: ghcr.io
Expand All @@ -17,6 +20,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

- name: Pull Git LFS files
run: git lfs pull

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -28,5 +36,10 @@ jobs:
- name: Build and push zooma Docker image
run: |
docker build -t ghcr.io/ebispot/zooma:${{ github.sha }} .
docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${{ github.ref_name }}
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
TAG="PR-${{ github.event.pull_request.number }}"
else
TAG="${{ github.ref_name }}"
fi
docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${TAG}
docker push --all-tags ghcr.io/ebispot/zooma
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ ENV ZOOMA_OPTS="-Xms1g -Xmx4g"
RUN mkdir /opt/zooma_github /opt/zooma
RUN apt-get update && apt-get install -y nano maven
COPY . /opt/zooma_github/

RUN rm -rf /root/.m2/
RUN tar -xvzf /opt/zooma_github/ols-client/lib/m2directory.tar.gz -C /root/

ENV OJDBC6="https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/utilities_drivers/jdbc/11204/ojdbc6.jar"
RUN wget $OJDBC6 -O /lib/ojdbc6.jar \
&& mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dpackaging=jar -Dversion=11.2.0.4 -Dfile=/lib/ojdbc6.jar \
&& test /root/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar

RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/jena-core-2.12.0.jar -DgroupId=org.apache.jena -DartifactId=jena-core -Dversion=2.12.0
RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/jena-arq-2.12.0.jar -DgroupId=org.apache.jena -DartifactId=jena-arq -Dversion=2.12.0
RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/lode-core-api-1.3.jar -DgroupId=ebi-lode -DartifactId=lode-core-api -Dversion=1.3
RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/lode-virtuoso-impl-1.3.jar -DgroupId=ebi-lode -DartifactId=lode-virtuoso-impl -Dversion=1.3
RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-ui/lib/jackson-mapper-asl-1.5.3.jar -DgroupId=org.codehaus.jackson -DartifactId=jackson-mapper-asl -Dversion=1.5.3
RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-ui/lib/jackson-core-asl-1.5.3.jar -DgroupId=org.codehaus.jackson -DartifactId=jackson-core-asl -Dversion=1.5.3

RUN cd /opt/zooma_github && mvn clean package
RUN mkdir /opt/tmp && unzip /opt/zooma_github/zooma-builder-app/target/zooma-builder.zip -d /opt/tmp
RUN cp /opt/zooma_github/zooma-ui/target/zooma.war /usr/local/tomcat/webapps/
Expand Down
3 changes: 3 additions & 0 deletions ols-client/lib/m2directory.tar.gz
Git LFS file not shown

0 comments on commit 4c69f49

Please sign in to comment.