Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker for CI and a workflow to build and publish #80

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ "master", "main" ]
paths:
- 'docker/sigma-ci/Dockerfile'
pull_request:
branches: [ "master", "main" ]
paths:
- 'docker/sigma-ci/Dockerfile'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: docker/sigma-ci/Dockerfile
push: ${{ github.event_name == 'push' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sigma-ci:latest
cache-from: type=gha
cache-to: type=gha,mode=max
30 changes: 30 additions & 0 deletions docker/sigma-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM tomcat:9.0.73-jdk8-temurin-jammy as builder

RUN apt update; \
apt-get install -y --no-install-recommends \
build-essential \
; \
wget 'http://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_2.6/E.tgz' &&\
tar xf E.tgz ; \
cd E ; \
./configure && make ;\
cd .. ;\
wget 'http://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz' ; \
tar xf WordNet-3.0.tar.gz

#################################################
# runtime image.
FROM tomcat:9.0.73-jdk8-temurin-jammy as runtime

COPY --from=builder \
/usr/local/tomcat/E/PROVER/e_ltb_runner /usr/local/bin/e_ltb_runner

COPY --from=builder \
/usr/local/tomcat/WordNet-3.0 /opt/WordNet-3.0

RUN apt update; \
apt-get install -y --no-install-recommends \
ant \
ant-optional \
git \
graphviz
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.