Skip to content

Commit

Permalink
adding Dockerization modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenyu Nie committed Nov 23, 2023
1 parent 3855b0e commit 7e00ae4
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 35 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Publish Docker image

on:
push:
branches:
- main
- Dockerization
paths:
- 'Dockerfile'

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: wenyunie/dsci522-rocker-speed-dating
tags: |
type=raw, value=milestone2
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,6 @@ cython_debug/
.Rproj.user
.RData
.RHistory
.config/
.local/
.sh_history
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM rocker/tidyverse:4.3.2

RUN Rscript -e "remotes::install_version('here', '1.0.1')" &&\
Rscript -e "remotes::install_version('markdown', '1.11')"
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
analysis-env:
image: wenyunie/dsci522-rocker-speed-dating:milestone2 # This is going to be replaced by our customized computational environment image
ports:
- "8787:8787"
volumes:
- .:/home/rstudio
environment:
PASSWORD: key_to_dating
49 changes: 14 additions & 35 deletions output/analysis_report.html

Large diffs are not rendered by default.

0 comments on commit 7e00ae4

Please sign in to comment.