copy_folder_instructions <- function(folderpath='.',buildFolder=NULL){
if(is.null(buildFolder)){
stop('buildFolder must be specified')
}
if(folderpath=='.'){
folderpath <- getwd()
}
foldername <- return_last(strsplit(folderpath,'/|\\\\')[[1]])
file.copy(folderpath,buildFolder,recursive=TRUE)
instructions <- sprintf('RUN mkdir -p "/home/rstudio/%s"\nCOPY ["%s", "/home/rstudio/%s"]\nRUN chown -R rstudio "/home/rstudio/%s"',foldername,foldername,foldername,foldername)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.