-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f890dc9
Showing
2 changed files
with
83 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,40 @@ | ||
name: docker publish | ||
|
||
on: push | ||
|
||
jobs: | ||
build-tools-images: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
container: | ||
- name: SLiM | ||
version: 4.2.2 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata for Docker | ||
id: metadata # store tags/labels in this workflow id | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository }}/tools/${{ matrix.container.name }} | ||
tags: | | ||
type=raw,value=${{ matrix.container.version }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: docker/tools/${{ matrix.container.name }} | ||
load: true | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
build-args: | | ||
VERSION=${{ matrix.container.version }} |
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,43 @@ | ||
FROM debian:trixie-slim AS base | ||
FROM base AS build-stage | ||
|
||
ARG VERSION | ||
ARG MAKE_THREADS=6 | ||
|
||
RUN \ | ||
set -ex; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
curl \ | ||
ca-certificates \ | ||
cmake \ | ||
make \ | ||
gcc \ | ||
g++ \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN \ | ||
set -exu; \ | ||
curl -L "https://github.com/MesserLab/SLiM/archive/refs/tags/v${VERSION}.tar.gz" | tar -xz; \ | ||
cd "SLiM-${VERSION}"; \ | ||
mkdir build; \ | ||
cd build; \ | ||
cmake -DBUILD_LTO=ON -DBUILD_TYPE=Release ..; \ | ||
make -j "$MAKE_THREADS"; \ | ||
mv slim /usr/local/bin | ||
|
||
FROM base AS final | ||
|
||
COPY --from=build-stage /usr/local/bin /usr/local/bin | ||
|
||
# RUN \ | ||
# set -ex; \ | ||
# apt-get update; \ | ||
# apt-get install -y --no-install-recommends \ | ||
# libcurl4 \ | ||
# libgsl27 \ | ||
# libperl5.34; \ | ||
# rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["slim"] |