Skip to content

Commit 8de7413

Browse files
author
Giulio
committed
Simplify Dockerfile and GHA worflow
1 parent f1a82c8 commit 8de7413

3 files changed

Lines changed: 49 additions & 134 deletions

File tree

‎.github/workflows/basic_checks.yaml‎

Lines changed: 0 additions & 130 deletions
This file was deleted.

‎.github/workflows/build.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build omatutorials container
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- docktest
7+
jobs:
8+
build-docker:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v6
16+
with:
17+
repository: ${{ github.event.inputs.repository }}
18+
fetch-depth: 0
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Login to Docker Registry
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.repository_owner }}
28+
password: ${{ secrets.GITHUB_TOKEN}}
29+
30+
- name: Extract metadata for Docker image
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ghcr.io/${{ github.repository_owner }}/omatutorials
35+
36+
- name: Build and push Docker image
37+
uses: docker/build-push-action@v6
38+
with:
39+
context: .
40+
file: ./Dockerfile
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}
43+
labels: ${{ steps.meta.outputs.labels }}

‎Dockerfile‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
FROM bioconductor/bioconductor_docker:devel
22

3-
WORKDIR /home/rstudio
3+
WORKDIR /home/rstudio/OMATutorials
44

5-
COPY --chown=rstudio:rstudio . /home/rstudio/
5+
COPY --chown=rstudio:rstudio . /home/rstudio/OMATutorials
66

7-
RUN Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); BiocManager::install(ask=FALSE)"
7+
RUN apt-get update && apt-get install -y libglpk-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
88

9-
RUN Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); install.packages('remotes'); remotes::install_local('.', dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE)"
9+
ENV R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
10+
11+
RUN Rscript -e "install.packages('remotes'); remotes::install_local('.', dependencies = TRUE, repos = BiocManager::repositories())"

0 commit comments

Comments
 (0)