-
Notifications
You must be signed in to change notification settings - Fork 6
/
check_cont.R
35 lines (33 loc) Β· 986 Bytes
/
check_cont.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#' Check containers exist
#'
#' Check that a list of containers are valid.
#' @inheritParams construct_runners
#' @returns Null
#'
#' @keywords internal
check_cont <- function(cont,
verbose = TRUE){
# devoptera::args2vars(check_cont)
# cont <- list("ghcr.io/bioconductor/bioconductor_docker:devel" )
n_parts <- check_cont_general(cont)
for(co in cont){
if(is.null(co)) next()
#### Check container ####
if(grepl("ghcr.io",co)){
check_cont_ghcr(cont = co,
verbose = verbose)
} else if(grepl("docker.io",cont)){
check_cont_dockerhub(cont = co,
verbose = verbose)
} else if(n_parts==2){
messager("Assuming container is on DockerHub.",v=verbose)
check_cont_dockerhub(cont = co,
verbose = verbose)
} else {
warning(paste(
"Unable to check registry for container",co,
"Skipping check."
))
}
}
}