Skip to content

Commit

Permalink
Merge pull request Reed-CompBio#177 from jhiemstrawisc/docker-rmi-in-…
Browse files Browse the repository at this point in the history
…GHA-builds

Modify GHA Docker build tests to clean up after themselves
  • Loading branch information
agitter authored Aug 21, 2024
2 parents b4f8d51 + b0ffad1 commit 8dc917e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test-spras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ jobs:
tags: latest
cache_froms: reedcompbio/omics-integrator-1:latest
push: false
- name: Remove Omics Integrator 1 Docker image
# Remove the image to prevent the cache from being used. Here we use
# `|| true` to prevent the job from failing if the image doesn't exist or
# can't be removed for some reason
run: docker rmi reedcompbio/omics-integrator-1:latest || true

- name: Build Omics Integrator 2 Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -103,6 +109,9 @@ jobs:
tags: v2
cache_froms: reedcompbio/omics-integrator-2:latest
push: false
- name: Remove Omics Integrator 2 Docker image
run: docker rmi reedcompbio/omics-integrator-2:latest || true

- name: Build PathLinker Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -112,6 +121,9 @@ jobs:
tags: v2
cache_froms: reedcompbio/pathlinker:latest
push: false
- name: Remove PathLinker Docker image
run: docker rmi reedcompbio/pathlinker:latest || true

- name: Build Maximum Edge Orientation Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -121,6 +133,9 @@ jobs:
tags: latest
cache_froms: reedcompbio/meo:latest
push: false
- name: Remove MEO Docker image
run: docker rmi reedcompbio/meo:latest || true

- name: Build MinCostFlow Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -130,6 +145,9 @@ jobs:
tags: latest
cache_froms: reedcompbio/mincostflow:latest
push: false
- name: Remove MinCostFlow Docker image
run: docker rmi reedcompbio/mincostflow:latest || true

- name: Build All Pairs Shortest Paths Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -139,6 +157,9 @@ jobs:
tags: v2
cache_froms: reedcompbio/allpairs:latest
push: false
- name: Remove All Pairs Shortest Paths Docker image
run: docker rmi reedcompbio/allpairs:latest || true

- name: Build DOMINO Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -148,6 +169,9 @@ jobs:
tags: latest
cache_froms: reedcompbio/domino:latest
push: false
- name: Remove DOMINO Docker image
run: docker rmi reedcompbio/domino:latest || true

- name: Build Cytoscape Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -157,6 +181,9 @@ jobs:
tags: v3
cache_froms: reedcompbio/py4cytoscape:v3
push: false
- name: Remove Cytoscape Docker image
run: docker rmi reedcompbio/py4cytoscape:v3 || true

- name: Build SPRAS Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -166,6 +193,8 @@ jobs:
tags: v0.1.0
cache_froms: reedcompbio/spras:v0.1.0
push: false
- name: Remove SPRAS Docker image
run: docker rmi reedcompbio/spras:v0.1.0 || true

# Run pre-commit checks on source files
pre-commit:
Expand Down
6 changes: 3 additions & 3 deletions docker-wrappers/SPRAS/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM almalinux:9

RUN dnf install -y epel-release

# gcc/g++ are required for building several of the packages if you're using apple silicon
RUN dnf update -y && \
dnf install -y epel-release && \
dnf install -y gcc gcc-c++ \
python3.11 python3.11-pip python3.11-devel \
docker apptainer
docker apptainer && \
dnf clean all

COPY / /spras/
RUN chmod -R 777 /spras
Expand Down

0 comments on commit 8dc917e

Please sign in to comment.