-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from sybila/add_dockerfile
Add dockerfile
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 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,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 }} |
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,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" |
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