Skip to content

Commit

Permalink
Merge pull request #140 from sybila/add_dockerfile
Browse files Browse the repository at this point in the history
Add dockerfile
  • Loading branch information
xtrojak authored Aug 16, 2022
2 parents e72428c + 5c433fe commit daaebff
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Build and Publish Image
on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: sybila/parasim
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Prepare
id: prepare
run: |
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=release_tag::${{ github.event.release.tag_name }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: |
docker build \
--tag ${{ steps.prepare.outputs.docker_image }}:latest \
--tag ${{ steps.prepare.outputs.docker_image }}:${{ github.event.release.tag_name }} \
.
- name: Publish Docker image
# Only deploy if using master on original repo (and not for pull requests or forks)
if: github.repository_owner == 'sybila' && github.ref == 'refs/heads/master'
run: |
docker push --all-tags ${{ steps.prepare.outputs.docker_image }}
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Download base image ubuntu 16.04
FROM ubuntu:16.04
MAINTAINER Matej Trojak <xtrojak@fi.muni.cz>

# Install dependencies
RUN apt-get update
RUN apt-get install -y wget software-properties-common

# Install Octave
RUN apt-add-repository ppa:octave/stable
RUN apt-get update
RUN apt-get install -y octave

# Install miniconda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
RUN /bin/bash ~/miniconda.sh -b -p /opt/conda
ENV PATH="/opt/conda/bin:$PATH"

# Install Java
RUN conda install -c conda-forge openjdk=8.0.332

# Install Parasim
COPY . parasim/
WORKDIR parasim
RUN ./gradlew installDist
ENV PATH="/parasim/application/build/install/parasim/bin:$PATH"
2 changes: 2 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Docker Pulls](https://badgen.net//docker/pulls/sybila/parasim?icon=docker)](https://hub.docker.com/r/sybila/parasim/)

# Parasim
Parasim is a tool for robustness analysis. For information not covered in this README visit the [Parasim wiki](https://github.com/sybila/parasim/wiki).

Expand Down

0 comments on commit daaebff

Please sign in to comment.