diff --git a/.github/workflows/docker-build-test.yml b/.github/workflows/docker-build-test.yml index d22e887e..7d572233 100644 --- a/.github/workflows/docker-build-test.yml +++ b/.github/workflows/docker-build-test.yml @@ -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 @@ -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 @@ -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) @@ -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 }} diff --git a/docker/Dockerfile b/docker/Dockerfile index d3c50bc9..ef188ff0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 \ diff --git a/resources/Dockerfile b/resources/Dockerfile new file mode 100644 index 00000000..46fc78d0 --- /dev/null +++ b/resources/Dockerfile @@ -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"