diff --git a/workflows/shiny/Dockerfile b/workflows/shiny/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..01b85ffdf2b66e9bd1b90733ae43f980cb543749 --- /dev/null +++ b/workflows/shiny/Dockerfile @@ -0,0 +1,13 @@ +# Use an official R base image +FROM rocker/shiny:4.4 + +# Install R packages +RUN R -q -e 'install.packages("ggplot2")' + +EXPOSE 3838 + +# Set the working directory to /app +WORKDIR /app + +# Default command to run when the container starts +CMD ["R"] diff --git a/workflows/shiny/shiny-app.R b/workflows/shiny/shiny-app.R index 4c020248813f9dfe57180989361fa246103f07a7..4d4275f1d6d43a7f6ff232e5a2855e2791cce135 100644 --- a/workflows/shiny/shiny-app.R +++ b/workflows/shiny/shiny-app.R @@ -3,7 +3,6 @@ # Load libraries library(shiny) -library(RColorBrewer) library(ggplot2) # CLI arguments @@ -65,4 +64,5 @@ server <- function(input, output, session) { # Launch app -shinyApp(ui, server) +sa <- shinyApp(ui, server) +runApp(sa, port = 3838) diff --git a/workflows/shiny/workflow.cwl b/workflows/shiny/workflow.cwl index 2e80423e1801af7875f5917f15ff4f704afa2c9e..00d0f26f62c10679c181f711ea54aa69f4f481ba 100644 --- a/workflows/shiny/workflow.cwl +++ b/workflows/shiny/workflow.cwl @@ -4,8 +4,9 @@ cwlVersion: v1.2 class: CommandLineTool # hints: -# DockerRequirement: -# dockerPull: +# DockerRequirement: +# dockerImageId: "shiny" +# dockerFile: {$include: "Dockerfile"} requirements: - class: InitialWorkDirRequirement