Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make docker unfail #431

Merged
merged 6 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ jobs:
if: ${{ github.head_ref == 'repo-sync/OTTR_Template/default' }}
run: |
echo This was tested on OTTR_Template no need to re-run
exit 1

# Set up Docker build
- name: Set up Docker Buildx
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/setup-buildx-action@v1

# Setup layer cache
- name: Cache Docker layers
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
Expand All @@ -61,13 +62,16 @@ jobs:

# Set up Docker build
- name: Set up Docker Build
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/setup-buildx-action@v1

- name: Get token
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
run: echo ${{ secrets.GH_PAT }} > docker/git_token.txt

# Build docker image
- name: Build Docker image
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/build-push-action@v2
with:
push: false
Expand All @@ -90,6 +94,7 @@ jobs:
run: docker push jhudsl/course_template

- name: Get the version
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
id: get_version
run: |
echo ::set-output name=version::$(echo $GITHUB_REF | cut -d / -f 3)
Expand All @@ -99,4 +104,4 @@ jobs:
if: ${{ github.event_name == 'release' }}
run: |
docker tag jhudsl/course_template:latest jhudsl/course_template:${{ steps.get_version.outputs.version }}
docker push jhudsl/course_template:1.0
docker push jhudsl/course_template:${{ steps.get_version.outputs.version }}
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ COPY install_github.R .

# Install apt-getable packages to start
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog

RUN apt-get install -y --no-install-recommends \
libxt6 \
libpoppler-cpp-dev \
Expand Down
19 changes: 19 additions & 0 deletions resources/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM jhudsl/course_template
LABEL maintainer="your_email.com"

#################### EXAMPLES OF INSTALLING PACKAGES ###########################
# Install a Linux/Ubuntu package
# RUN apt-get update && apt-get install -y --no-install-recommends \
# package_name

# Install a package from CRAN
# RUN Rscript -e "install.packages( \
# c('package_name'))"

# Install a package from Bioconductor
# RUN Rscript -e "options(warn = 2); BiocManager::install( \
# c('package_name')

# Add a python package
# RUN RUN pip3 install \
# "somepackage==0.1.0"