Skip to content

Commit 7a1a404

Browse files
author
Stephen Holsenbeck
committed
Fix ordering of packages in Dockerfile
1 parent ffb36ac commit 7a1a404

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

R/dock_from_desc.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ dock_from_desc <- function(
8383
packages <- packages[packages$type != "Suggests",]
8484
packages <- packages$package
8585
packages <- packages[packages != "R"] # remove R
86-
packages <- sort(packages[!packages %in% base_pkg_]) # remove base and recommended
86+
packages <- packages[!packages %in% base_pkg_] # remove base and recommended
8787

8888
if (sysreqs) {
8989

@@ -134,10 +134,10 @@ dock_from_desc <- function(
134134
packages
135135
)
136136

137-
packages_not_on_cran <- setdiff(
137+
packages_not_on_cran <- sort(setdiff(
138138
packages,
139139
packages_on_cran
140-
)
140+
))
141141

142142
packages_with_version <- data.frame(
143143
package = remotes_deps$package,
@@ -153,6 +153,7 @@ dock_from_desc <- function(
153153
packages_with_version$package
154154
)
155155

156+
packages_on_cran <- packages_on_cran[order(names(packages_on_cran))]
156157
# Add SHA for Architecture
157158
if (!is.null(sha256))
158159
FROM <- paste0(FROM, "@sha256:", sha256)

0 commit comments

Comments
 (0)