Skip to content

Commit

Permalink
Adding Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
JBris committed Dec 31, 2024
1 parent 96652f6 commit 3598862
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_VERSION=v2.7.3
38 changes: 38 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker Build

on:
workflow_dispatch: {}
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: write
packages: write

jobs:
build-docker:
runs-on: ubuntu-latest

steps:
- name: Docker logout
run: docker logout
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker build
run: docker compose build beast2
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Docker push
run: docker compose push beast2
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down
20 changes: 20 additions & 0 deletions Dockerfile.v2.7.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM openjdk:8

ARG APP_VERSION

ARG DEBIAN_FRONTEND=noninteractive

ENV USER root

ENV PATH=/root/beast/bin:$PATH

WORKDIR /root/

RUN apt-get update \
&& apt-get install -y --no-install-recommends curl git cmake build-essential autoconf automake libtool pkg-config \
&& curl -fsSLO https://github.com/CompEvol/beast2/releases/download/${APP_VERSION}/BEAST.${APP_VERSION}.Linux.x86.tgz \
&& tar fxz BEAST.${APP_VERSION}.Linux.x86.tgz \
&& git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/downloaded_packages
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.9"

services:

beast2:
image: ghcr.io/jbris/beast2:${APP_VERSION}
build:
context: .
dockerfile: Dockerfile.${APP_VERSION}
args:
APP_VERSION: $APP_VERSION

0 comments on commit 3598862

Please sign in to comment.